diff --git a/Assets/Scripts/Child.cs b/Assets/Scripts/Child.cs index 5702c07..66d14ca 100644 --- a/Assets/Scripts/Child.cs +++ b/Assets/Scripts/Child.cs @@ -359,7 +359,7 @@ public class Child : MonoBehaviour void Die() { PlayerWinsMenu menu = (PlayerWinsMenu)MenusHandler.MenusManager.Instance.ShowMenu("PlayerWinsMenu"); - menu.SetPlayerIndex(this.Index); + menu.SetPlayerIndex(this.Index == 1 ? 2 : 1); Destroy(gameObject); } diff --git a/Assets/Scripts/Menus/SimpleMenu.cs b/Assets/Scripts/Menus/SimpleMenu.cs index 7e0d491..778d3a1 100644 --- a/Assets/Scripts/Menus/SimpleMenu.cs +++ b/Assets/Scripts/Menus/SimpleMenu.cs @@ -1,26 +1,22 @@ -using UnityEngine; +using UnityEngine; using System.Collections; public class SimpleMenu : MonoBehaviour { - public int NextLevel; - - // Use this for initialization - void Start () { - StartCoroutine(AutoSkip()); - } - - // Update is called once per frame + public int NextLevel; + + + // Update is called once per frame void Update () { if (Input.anyKeyDown) { Application.LoadLevel(NextLevel); - } + } } IEnumerator AutoSkip() { yield return new WaitForSeconds(5); - Application.LoadLevel(NextLevel); + - } -} + } +}