Ejemplo n.º 1
0
    IEnumerator LetsStart()
    {
        float f2 = 1.2f;
        float f3 = 1.4f;
        float ma = 4.7f;

        yield return(new WaitForSeconds(0.2f));

        aud.PlayOneShot(startSE);

        yield return(new WaitForSeconds(f2)); // 開始音楽が鳴りやむまで

        //Debug.Log(f2 + " seconds passed");

        blinky.SetActive(true);
        inky.SetActive(true);
        pinky.SetActive(true);
        clyde.SetActive(true);
        pacman.SetActive(true);

        pinkyScript.ChangeDirection(Direction.down);

        yield return(new WaitForSeconds(f3)); //

        ShowInfoText("READY!");

        yield return(new WaitForSeconds((ma - f2 - f3))); // 開始音楽が鳴りやむまで

        HideInfoText();

        UnFreeze();
        pacmanScript.LetsStart();

        PlaySE(SoundEffect.ghost);

        yield return(new WaitForSeconds(0.45f));
    }