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); }
public bool HackingPanel(Vector2 playerPosition) { if (IsPlayerCloseHorizontal(playerPosition) && IsPlayerCloseVertical(playerPosition)) { console.isBeingHacked = true; console.LoadPanel(); return(true); } return(false); }