public void GameOver(bool forced) { int g = GameOverCheck(); if (g != -1 || forced) { isOver = true; if (g == 1) { Debug.Log("You Win"); } else { Debug.Log("You Lost"); } this.gameObject.SetActive(false); MidGameUI.SetActive(false); StartGameUI.SetActive(true); PauseGameUI.SetActive(false); camera.StartIt(); camera.GameStart(); isPaused = false; } }
void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { PauseButton(); } if (!isOver) { if (!isPaused) { Arrow.Target = currentTurn.GiveCulprit.Object; if (currentTurn.culprit.TeamNumber == 1) { isPlayer = true; } else { isPlayer = false; } if (!isPlayer) { if (!currentTurn.isFinished) { aI.Update(); } } else { if (!isWaiting()) { currentTurn.targetAquired = true; currentTurn.Update(); } } DeleteCharacters(); GameOver(false); Range(); } else { PauseGameUI.SetActive(true); } } /* Debug.Log($"Turn isMoving: {currentTurn.isMoving}"); * Debug.Log($"Turn isAttacking: {currentTurn.isAttacking}"); * Debug.Log($"Turn usedSkill: {currentTurn.usedSkill}"); */ }
public void PauseButton() { if (isPaused) { PauseGameUI.SetActive(false); MidGameUI.SetActive(true); } else { MidGameUI.SetActive(false); } isPaused = !isPaused; }