Esempio n. 1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.CompareTag("Controller"))
     {
         if (!_pressed)
         {
             _anim.SetBool(AnimatBoolName, true);
             _pressed = true;
             _audio.Play();
             _keypadScript.ButtonPressed(ButtonValue, _pressed);
         }
         else
         {
             _anim.SetBool(AnimatBoolName, false);
             _pressed = false;
             _keypadScript.ButtonPressed(ButtonValue, _pressed);
         }
     }
 }