Exemple #1
0
    IEnumerator RecoverForSeconds(float secs)
    {
        for (float i = 0.0f; i < secs; i += 0.2f)
        {
            yield return(new WaitForSeconds(0.1f));

            transform.parent.GetComponent <SpriteRenderer>().renderer.enabled = false;
            yield return(new WaitForSeconds(0.1f));

            transform.parent.GetComponent <SpriteRenderer>().renderer.enabled = true;
        }
        this.transform.parent.GetComponent <SpriteRenderer>().renderer.enabled = true;
        recovering.SwitchFrom();
    }
 void EndElevatorScene()
 {
     movie.onFinished -= EndElevatorScene;
     state.SwitchFrom();
     Application.LoadLevel(nextLevel);
 }