Exemplo n.º 1
0
            public void OnStateEnter()
            {
                if (mainMenu == null)
                {
                    mainMenu = new Menu();
                    GameManager.Spawn(mainMenu);
                }
                else
                {
                    mainMenu.Active = true;
                    foreach (Component item in mainMenu.Components)
                    {
                        item.Enabled = true;
                    }
                }

                if (menuBg == null)
                {
                    menuBg = new MenuBackground("MainScreen");
                    GameObject.Spawn(menuBg);
                }
                else
                {
                    menuBg.Active = true;
                    foreach (Component item in menuBg.Components)
                    {
                        item.Enabled = true;
                    }
                }
            }
Exemplo n.º 2
0
 public void OnStateEnter()
 {
     if (loseBg == null)
     {
         loseBg = new MenuBackground("Lose");
         GameObject.Spawn(loseBg);
     }
     else
     {
         loseBg.Active = true;
         foreach (Component item in loseBg.Components)
         {
             item.Enabled = true;
         }
     }
 }