Пример #1
0
 void OnTriggerStay2D(Collider2D other)
 {
     if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow))
     {
         if (AllowUp)
         {
             GoUp();
         }
         else
         {
             AccessDeniedUpInteraction?.StartInteraction();
         }
     }
     else if (Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.DownArrow))
     {
         if (AllowDown)
         {
             GoDown();
         }
         else
         {
             AccessDeniedDownInteraction?.StartInteraction();
         }
     }
 }
Пример #2
0
 protected override void BubbleClosed()
 {
     base.StartInteraction();
     AfterInteraction.StartInteraction();
 }