Exemplo n.º 1
0
    void Start()
    {
        switch (GType)
        {
        case GameType.QuickFire:
            BaseUIController.topMenu = SupportTools.AddChild <TopMenuQuickFire>(BaseUIController.TopMenuRoot.gameObject, "UI/BattleScene/TopMenuQuickFire");
            Rules = gameObject.AddComponent <PoolRulesQuickFire>();
            break;

        case GameType.Standard:
            BaseUIController.topMenu = SupportTools.AddChild <TopMenuStandard>(BaseUIController.TopMenuRoot.gameObject, "UI/BattleScene/TopMenuStandard");
            Rules = gameObject.AddComponent <PoolRulesStandard>();
            break;

        case GameType.Mission:
            BaseUIController.topMenu = SupportTools.AddChild <TopMenuMission>(BaseUIController.TopMenuRoot.gameObject, "UI/BattleScene/TopMenuMission");
            Rules = gameObject.AddComponent <PoolRulesMission>();
            break;

        case GameType.AI:
            BaseUIController.topMenu = SupportTools.AddChild <TopMenuStandard>(BaseUIController.TopMenuRoot.gameObject, "UI/BattleScene/TopMenuMultipleAI");
            Rules = gameObject.AddComponent <PoolRulesMultiple>();
            break;
        }
        Rules.SetPlayers(BaseUIController.topMenu.GetPlayers());
    }
Exemplo n.º 2
0
 void Start()
 {
     switch (GType)
     {
         case GameType.QuickFire:
             BaseUIController.topMenu = SupportTools.AddChild<TopMenuQuickFire>(BaseUIController.TopMenuRoot.gameObject, "UI/BattleScene/TopMenuQuickFire");
             Rules = gameObject.AddComponent<PoolRulesQuickFire>();
             break;
         case GameType.Standard:
             BaseUIController.topMenu = SupportTools.AddChild<TopMenuStandard>(BaseUIController.TopMenuRoot.gameObject, "UI/BattleScene/TopMenuStandard");
             Rules = gameObject.AddComponent<PoolRulesStandard>();
             break;
         case GameType.Mission:
             BaseUIController.topMenu = SupportTools.AddChild<TopMenuMission>(BaseUIController.TopMenuRoot.gameObject, "UI/BattleScene/TopMenuMission");
             Rules = gameObject.AddComponent<PoolRulesMission>();
             break;
         case GameType.AI:
             BaseUIController.topMenu = SupportTools.AddChild<TopMenuStandard>(BaseUIController.TopMenuRoot.gameObject, "UI/BattleScene/TopMenuMultipleAI");
             Rules = gameObject.AddComponent<PoolRulesMultiple>();
             break;
     }
     Rules.SetPlayers(BaseUIController.topMenu.GetPlayers());
 }