Пример #1
0
 void OnTriggerStay2D(Collider2D other)
 {
     if (other.tag == "Player" && Input.GetAxis("Jump") != 0)
     {
         if (door.isLocked && Inventory.GetSelectedItemName() == "ID Card")
         {
             door.Lock(false);
             animator.SetTrigger("unlocking");
         }
     }
 }
Пример #2
0
 void OnTriggerStay2D(Collider2D other)
 {
     if (other.tag == "Player" && Input.GetAxis("Jump") != 0)
     {
         if (door.isLocked)
         {
             if (Inventory.GetSelectedItemName() == "ID Card")
             {
                 door.Lock(false);
                 animator.SetTrigger("unlocking");
                 audio.PlayOneShot(sfxUnlock);
             }
             else
             {
                 audio.PlayOneShot(sfxLock);
                 Fungus.Flowchart.BroadcastFungusMessage("DeniedAccess");
             }
         }
     }
 }