Пример #1
0
 protected override void HandleCommand(ChestSwitchCommand chstSwtchCmnd)
 {
     if (focousedChest == null)  //there's no focused chest
     {
         foreach (GameObject obj in collidesWithNow)
         {
             if (obj is Chest)
             {
                 focousedChest = obj as Chest;
                 focousedChest.SwitchChestState();   //open it
                 break;
             }
         }
     }
     else                                  //there's a focused chest
     {
         focousedChest.SwitchChestState(); //close it
         focousedChest = null;
     }
 }
Пример #2
0
 protected virtual void HandleCommand(ChestSwitchCommand chstSwtchCmnd)
 {
 }