示例#1
0
 public bool HackingDoor(Vector2 playerPosition)
 {
     if (IsPlayerCloseHorizontal(playerPosition) && IsPlayerCloseVertical(playerPosition))
     {
         if (isUnlocked)
         {
             // isUnlocked = true;
             if (doorState == state.closed)
             {
                 doorState = state.opening;
             }
             else if (doorState == state.opened)
             {
                 doorState = state.closing;
             }
         }
         else if (!isUnlocked)
         {
             hackingConsole.isBeingHacked = true;
             hackingConsole.LoadPanel();
             return(true);
         }
     }
     return(false);
 }
示例#2
0
 public bool HackingPanel(Vector2 playerPosition)
 {
     if (IsPlayerCloseHorizontal(playerPosition) && IsPlayerCloseVertical(playerPosition))
     {
         console.isBeingHacked = true;
         console.LoadPanel();
         return(true);
     }
     return(false);
 }