Ejemplo n.º 1
0
        void onTowerSelected(UnitTower unit)
        {
            print(unit.unitName + " selected");

            UIAbilityButton.AlignButtonBegin();

            List <Ability> abList = new List <Ability>();

            foreach (UnitStat unitStat in unit.stats)
            {
                if (unitStat.abilityHolder)
                {
                    Ability ability = unitStat.abilityHolder.ability;
                    int     id      = ability.ID;

                    foreach (Ability ab in abilityList)
                    {
                        if (ab.ID == id)
                        {
                            ab.abilityButton.rootObj.SetActive(true);
                        }
                    }
                }
            }
            UIAbilityButton.AlignButtonEnd();

            //BuildAbilityButtons(abList);
        }
Ejemplo n.º 2
0
        void OnFPSMode(bool flag)
        {
            //FPSModeCrosshairObj.SetActive(flag);

                        #if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY
            UIGameMessage.DisplayMessage("FPS mode is not supported in mobile");
                        #endif

            if (flag)
            {
                UIBuildButton.Hide();
                UIAbilityButton.Hide();
                UIPerkMenu.Hide();
                UIFPSHUD.Show();
            }
            else
            {
                if (UseDragNDrop())
                {
                    UIBuildButton.Show();
                }
                if (AbilityManager.IsOn())
                {
                    UIAbilityButton.Show();
                }
                if (PerkManager.IsOn())
                {
                    UIPerkMenu.Show();
                }
                UIFPSHUD.Hide();
            }
        }
Ejemplo n.º 3
0
        void onTowerDeselected()
        {
            UIAbilityButton.AlignButtonBegin();

            foreach (Ability ability in abilityList)
            {
                if (ability.belongToHero)
                {
                    ability.abilityButton.rootObj.SetActive(false);
                }
            }

            UIAbilityButton.AlignButtonEnd();
        }
Ejemplo n.º 4
0
 void OnNewAbility(Ability newAbility)
 {
     Debug.Log("new abiility");
     UIAbilityButton.AddNewAbility(newAbility);
 }
Ejemplo n.º 5
0
 void Awake()
 {
     instance = this;
     thisObj  = gameObject;
 }