예제 #1
0
 public override void ButtonPressed()
 {
     if (!moving && cleared)
     {
         if (!solved)
         {
             return;
         }
         else if (locked)
         {
             if (playerController.keys == 0)
             {
                 StartCoroutine(doorManager.BlinkLight());
             }
             else
             {
                 playerController.keys--;
                 StartCoroutine(doorManager.UnlockDoor());
                 locked = false;
             }
         }
         else
         {
             doorManager.ToggleLights(false);
             open   = !open;
             moving = true;
         }
     }
 }