public void closeQuestion()
 {
     QuestionToActivate.SetActive(false);
     Good.SetActive(false);
     Bad.SetActive(false);
     Medium.SetActive(false);
 }
    IEnumerator ending()
    {
        inGame.SetActive(false);
        if (playerHP >= 150)
        {
            Good.SetActive(true);
            yield return(new WaitForSecondsRealtime(3f));
        }
        else if (playerHP > 0)
        {
            Bad.SetActive(true);
            yield return(new WaitForSecondsRealtime(3f));
        }

        ResultCanvas.SetActive(true);
        ThisCanvas.SetActive(false);
    }
 // 게임 결과 창 뜨게 하기
 public void Result()
 {
     RemoveCanvas.SetActive(false);
     mode           = enemyMode.End;
     Time.timeScale = 0;
     Result_Screen.SetActive(true);
     if (playerHP >= 250)
     {
         Good.SetActive(true);
         Bad.SetActive(false);
     }
     else
     {
         Good.SetActive(false);
         Bad.SetActive(true);
     }
 }
Esempio n. 4
0
    public void TakePopulationDamage(int damage)
    {
        Debug.Log("TakingDamage");
        population -= damage;
        CivWorld.SetActive(false);
        ThrivingWorld.SetActive(false);
        Fertile.SetActive(false);
        Broken.SetActive(false);
        Bad.SetActive(false);
        Apocalyptic.SetActive(false);

        if (population > 2000)
        {
            CivWorld.SetActive(true);
        }
        if (population > 1500)
        {
            ThrivingWorld.SetActive(true);
        }
        if (population > 1200)
        {
            Fertile.SetActive(true);
        }
        if (population > 900)
        {
            Broken.SetActive(true);
        }
        if (population > 600)
        {
            Bad.SetActive(true);
        }
        if (population > 0)
        {
            Apocalyptic.SetActive(true);
        }

        if (population < 0)
        {
            GameOver();
        }
    }
Esempio n. 5
0
    IEnumerator ending()
    {
        if (playerHP >= 250)
        {
            Good.SetActive(true);
            yield return(new WaitForSecondsRealtime(3f));

            story.SetActive(true);
            talkingEnemy.GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprites/two");
            yield return(new WaitForSecondsRealtime(3f));

            for (int i = 1; i <= 8; i++)
            {
                talk.SetActive(true);
                talk.GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprites/two_good" + i);
                yield return(new WaitForSecondsRealtime(3f));
            }
        }
        else if (playerHP > 0)
        {
            Bad.SetActive(true);
            yield return(new WaitForSecondsRealtime(3f));

            story.SetActive(true);
            talkingEnemy.GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprites/two");
            yield return(new WaitForSecondsRealtime(3f));


            for (int i = 1; i <= 6; i++)
            {
                talk.SetActive(true);
                talk.GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprites/two_bad" + i);
                yield return(new WaitForSecondsRealtime(3f));
            }
        }

        SceneManager.LoadScene(4);
    }