예제 #1
0
파일: Race.cs 프로젝트: KevinNickolai/SC1.0
    protected AbilityList BaseBarrackAbilities(Barrack barrack)
    {
        Ability[] barrackAbilities = new Ability[AbilityList.MAX_SIZE];

        barrackAbilities[0] = new RepairAbility(new Tooltip());



        return(new AbilityList(barrackAbilities));
    }
예제 #2
0
        private void SetUpAbilities()
        {
            foreach (string abilityString in ShipAddOnData.Abilities)
            {
                AddOnAbility ability = null;

                switch (abilityString)
                {
                case "Repair":
                    ability = new RepairAbility("Data\\Abilities\\ShipAddOnAbilities\\Repair", this);
                    break;

                case "Sell":
                    ability = new SellAbility("Data\\Abilities\\ShipAddOnAbilities\\Sell", this);
                    break;

                case "Recharge":
                    ability = new RechargeAbility("Data\\Abilities\\ShipAddOnAbilities\\Recharge", (this as ShipShield));
                    break;

                case "Auto Reloader":
                    ability = new AutoReloaderAbility("Data\\Abilities\\ShipAddOnAbilities\\AutoReloader", (this as ShipKineticTurret));
                    break;

                case "Missile Barrage":
                    ability = new MissileBarrageAbility("Data\\Abilities\\ShipAddOnAbilities\\MissileBarrage", (this as ShipMissileTurret));
                    break;

                case "Afterburn":
                    ability = new AfterburnAbility("Data\\Abilities\\ShipAddOnAbilities\\Afterburn", (this as ShipEngine));
                    break;
                }

                ability.LoadContent();
                Abilities.Add(ability);
            }
        }