Esempio n. 1
0
    IEnumerator TutorialStart()
    {
        isTutorialEnd    = false;
        touchIntervalEnd = false;
        spriteIndex      = 0;
        SceneFader.GetInstance().FadeOut();
        yield return(new WaitForSeconds(1));

        SceneFader.GetInstance().FadeIn();
        tutorialImage.sprite = null;
        tutorialImage.gameObject.SetActive(true);
        if (languageMgr == null)
        {
            languageMgr = GameObject.FindObjectOfType <LanguageManager>();
        }
        if (languageMgr.currLanguage == Language.Korean)
        {
            tutorialImage.sprite = korSprites[0];
        }
        else
        {
            tutorialImage.sprite = engSprites[0];
        }
        StartCoroutine(TouchInterval());
    }
Esempio n. 2
0
    IEnumerator EndGame()
    {
        while (true)
        {
            yield return(null);

            if (SceneFader.GetInstance().fadeObjectImage.color == Color.black)
            {
                SceneFader.GetInstance().FadeIn();
                gameEndUI.SetActive(true);
                gameEndScoreText.text = "score\n" + (GameObject.FindObjectOfType <GameManager>().score).ToString();
                break;
            }
        }
    }
Esempio n. 3
0
    IEnumerator TutorialEnd()
    {
        SceneFader.GetInstance().FadeOut();
        yield return(new WaitForSeconds(1f));

        SceneFader.GetInstance().FadeIn();
        tutorialImage.gameObject.SetActive(false);
        if (gameMgr.isStart)
        {
            this.GetComponent <Image>().enabled = false;
            this.transform.Find("tutorial_t").GetComponent <Image>().enabled = false;
        }

        yield return(new WaitForSeconds(0.25f));

        isTutorialEnd = true;
    }
Esempio n. 4
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            EscapeProcess();
        }
        if (isEnd)
        {
            if (Input.GetMouseButtonDown(0) && Time.timeScale == 1)
            {
                SceneFader.GetInstance().ChangeScene(Application.loadedLevel);
            }
        }

        for (int i = 0; i < stars.Length; i++)
        {
            starsET[i] += Time.deltaTime * (i + 1) / 10f;
            if (isStarsVisible[i])
            {
                stars[i].color = Color.Lerp(stars[i].color, Color.clear, starsET[i]);
                if (stars[i].color == Color.clear)
                {
                    isStarsVisible[i] = false;
                    starsET[i]        = 0;
                }
            }
            else
            {
                stars[i].color = Color.Lerp(stars[i].color, Color.white, starsET[i]);
                if (stars[i].color == Color.white)
                {
                    isStarsVisible[i] = true;
                    starsET[i]        = 0;
                }
            }
        }

        background.Rotate(Vector3.forward * Time.deltaTime * 5f);
    }
Esempio n. 5
0
 public void OnGameEnd()
 {
     SceneFader.GetInstance().FadeOut();
     StartCoroutine(EndGame());
 }
Esempio n. 6
0
 public void OnExitButtonDown()
 {
     SceneFader.GetInstance().ChangeScene(Application.loadedLevel);
 }
Esempio n. 7
0
 public void EscapeProcess()
 {
     SceneFader.GetInstance().ChangeScene(0);
 }
Esempio n. 8
0
 public void OnReturn()
 {
     SceneFader.GetInstance().ChangeScene(0);
 }
Esempio n. 9
0
 public void OnTouch()
 {
     SceneFader.GetInstance().ChangeScene(2);
 }