Beispiel #1
0
 public UnitData(ResourceCost[] buildCost, int upkeep, TimeSpan timeToCreate, int attack, int defense, int survivability)
 {
     this.buildCost = buildCost;
     this.upkeep = upkeep;
     this.timeToCreate = timeToCreate;
     this.attack = attack;
     this.defense = defense;
     this.survivability = survivability;
 }
Beispiel #2
0
 public KeepData(ResourceCost[] buildCost, TimeSpan timeToCreate)
 {
     this.timeToCreate = timeToCreate;
     this.buildCost = buildCost;
 }
Beispiel #3
0
        private static void InitUnitContainer()
        {
            UnitNames unit;
            ResourceCost[] rCost;
            int uCost;
            TimeSpan ttc;
            int atk;
            int def;
            int surv;

            //Worker
            unit = UnitNames.Worker;
            rCost = new ResourceCost[] 
            { 
               
            };
            uCost = 1;
            ttc = new TimeSpan(0, 10, 0);
            atk = 0;
            def = 0;
            surv = 0;
            UnitContainer.Add(unit, new UnitData(rCost, uCost, ttc, atk, def, surv));

            //Knight
            unit = UnitNames.Knight;
            rCost = new ResourceCost[] 
            { 
                new ResourceCost(ResourceNames.Stone, 1) 
            };
            uCost = 1;
            ttc = new TimeSpan(0, 0, 1);
            atk = 5;
            def = 3;
            surv = 3;
            UnitContainer.Add(unit, new UnitData(rCost, uCost, ttc, atk, def, surv));

            //Archer
            unit = UnitNames.Archer;
            rCost = new ResourceCost[] 
            { 
                new ResourceCost(ResourceNames.Stone, 1) 
            };
            uCost = 1;
            ttc = new TimeSpan(0, 0, 1);
            atk = 3;
            def = 5;
            surv = 5;
            UnitContainer.Add(unit, new UnitData(rCost, uCost, ttc, atk, def, surv));

            //Fighter
            unit = UnitNames.Fighter;
            rCost = new ResourceCost[]
            {
                new ResourceCost(ResourceNames.Stone, 1)
            };
            uCost = 1;
            ttc = new TimeSpan(0, 0, 1);
            atk = 3;
            def = 5;
            surv = 5;
            UnitContainer.Add(unit, new UnitData(rCost, uCost, ttc, atk, def, surv));
        }