public void MissionLose() { PeopleSavedManager.peopleSaved = 0; if (EnemiesKilled.KillMode && FindObjectOfType <EnemiesKilled>() != null) { FindObjectOfType <EnemiesKilled>().ResetCounter(); } DefendPoint.health = 200; MissionManagementScript.MissionEnd("lose"); }
public void YesButton() { switch (buttonClicked) { case "Return": PeopleSavedManager.peopleSaved = 0; if (EnemiesKilled.KillMode && FindObjectOfType <EnemiesKilled>() != null) { FindObjectOfType <EnemiesKilled>().ResetCounter(); } DefendPoint.health = 200; MissionManagementScript.MissionEnd("lose", true); break; case "Quit": Application.Quit(); break; } }
private void OnCollisionStay2D(Collision2D collision) { if (collision.gameObject == player) { if (Input.GetKey(KeyCode.F)) { /* * PeopleSavedManager.peopleSaved = 0; * if (EnemiesKilled.KillMode && FindObjectOfType<EnemiesKilled>() != null) * { * FindObjectOfType<EnemiesKilled>().ResetCounter(); * } * DefendPoint.health = 200; */ if (currentSceneName != "Tutorial") { if (missionStatus == "win") { FindObjectOfType <WinLoseScreen>().ShowCanvas("win"); } else if (missionStatus == "lose") { FindObjectOfType <WinLoseScreen>().ShowCanvas("bus"); } } else { PeopleSavedManager.peopleSaved = 0; if (EnemiesKilled.KillMode && FindObjectOfType <EnemiesKilled>() != null) { FindObjectOfType <EnemiesKilled>().ResetCounter(); } DefendPoint.health = 200; MissionManagementScript.MissionEnd("lose"); } } } }