Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (_isOn && _subjectScript != null && ((other.gameObject.tag == "Player" && _playerOnly) || (other.gameObject.tag == "kunai" && !_playerOnly)))
     {
         _subjectScript.throwSwitch();
         _isOn = false;
         _myRenderer.sprite = _sprites [1];
     }
 }