예제 #1
0
 public void MissionLose()
 {
     PeopleSavedManager.peopleSaved = 0;
     if (EnemiesKilled.KillMode && FindObjectOfType <EnemiesKilled>() != null)
     {
         FindObjectOfType <EnemiesKilled>().ResetCounter();
     }
     DefendPoint.health = 200;
     MissionManagementScript.MissionEnd("lose");
 }
예제 #2
0
    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;
        }
    }
예제 #3
0
 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");
             }
         }
     }
 }