Esempio n. 1
0
    IEnumerator EndGame()
    {
        Destroy(GameObject.FindGameObjectWithTag("StartLaser"));
        yield return(new WaitForSeconds(winDelay));

        //Debug.Log("in end game");
        WallController w = Walls.GetComponent <WallController>();

        w.speed = wallSpeed;
        w.SetEndPos(-100);
        w.SetMove(true);
        yield return(new WaitForSeconds(mirrorDestroy));

        DestoryMirrors();
        yield return(new WaitForSeconds(exitDelay));

        EventManager.TriggerEvent("StartLeaves");
        yield return(new WaitForSeconds(smokeDelay));

        EventManager.TriggerEvent("StartSmoke");
    }