Ejemplo n.º 1
0
 void Start()
 {
     eventSystem = GameObject.Find("EventSystem");
     Level_1.SetActive(false);
     Level_2.SetActive(false);
     Tutorial_Level.SetActive(false);
 }
Ejemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     //Tutorial_Level.SetActive(true);
     //eventSystem.GetComponent<EventSystem>().SetSelectedGameObject(Tutorial_Level);
     Level_1.SetActive(true);
     eventSystem.GetComponent <EventSystem>().SetSelectedGameObject(Level_1);
     if (MenuScript.Instance.GetMaxLevel() > 1)
     {
         //Level_1.SetActive(true);
         //Tutorial_Level.SetActive(false);
         //eventSystem.GetComponent<EventSystem>().SetSelectedGameObject(Level_1);
     }
     if (MenuScript.Instance.GetMaxLevel() > 2)
     {
         Level_2.SetActive(true);
         eventSystem.GetComponent <EventSystem>().SetSelectedGameObject(Level_2);
     }
 }
Ejemplo n.º 3
0
        public static void LoadLevel(uint index)
        {
            Pool.Reset();
            switch (index)
            {
            case 0:
                Level_0.Load();
                break;

            case 1:
                Level_1.Load();
                break;

            case 2:
                Level_2.Load();
                break;
            }
            Data.CurrentLevel = index;
            PutCameraOnPlayer();
        }
Ejemplo n.º 4
0
 void OnTriggerExit2D(Collider2D other)
 {
     Level_1.SetActive(false);
     Level_2.SetActive(false);
     Tutorial_Level.SetActive(false);
 }