コード例 #1
0
    IEnumerator StartGameMode()
    {
        yield return(new WaitForSeconds(1));

        p1Light.enabled      = true;
        lightSound.pitch     = 1f;
        lightSound.panStereo = -0.65f;
        lightSound.Play();
        p1Detection.StartTriggOff();
        p2Detection.StartTriggOff();

        yield return(new WaitForSeconds(1));

        p2Light.enabled      = true;
        lightSound.pitch     = 0.92f;
        lightSound.panStereo = 0.65f;
        lightSound.Play();

        yield return(new WaitForSeconds(1));

        resetGame = false;
        running   = true;
        Invoke("PickButton", timeBtwSpawns);
        InGameUi.SetActive(true);

        gameMusic.Play();

        zoneP1.SetActive(true);
        zoneP2.SetActive(true);
    }