public Building(Colony colony, int level, int sCrystal, int sEnergy) { Colony = colony; Level = level; Crystals crystals = new Crystals(sCrystal != -1 ? sCrystal : StartedCrystalsCost); Energy energy = new Energy(sEnergy != -1 ? sEnergy : StartedEnergyCost); List <BaseResource> resources = new List <BaseResource> { crystals, energy }; Cost = new Resources(resources); //Colony.Planet.Resource.Empty += () => { //... //}; }
public Colony(string name, Planet planet, int sCrystal = startedCrystals, int sEnergy = startedEnergy) { Name = name; Crystals crystals = new Crystals(sCrystal); Energy energy = new Energy(sEnergy); List <BaseResource> resources = new List <BaseResource> { crystals, energy }; Resources = new Resources(resources); Planet = planet; BaseBuildings = new List <Base>(); CrystalsControlBuildings = new List <CrystalsControl>(); EnergyControlBuildings = new List <EnergyControl>(); CrystalsMiners = new List <CrystalsMiner>(); EnergyMiners = new List <EnergyMiner>(); }
public Planet( Space space, string name, string image, string descript, int sCrystal = startedCrystals, int sEnergy = startedEnergy ) { Space = space; Name = name; ImagePath = image; Descript = descript; Crystals crystals = new Crystals(sCrystal); Energy energy = new Energy(sEnergy); List <BaseResource> resources = new List <BaseResource> { crystals, energy }; Resources = new Resources(resources); }
protected override BaseResource Multi(int n) { Crystals res = new Crystals(Amount * n); return(res); }
protected override BaseResource Sub(BaseResource b) { Crystals res = new Crystals(Amount - b.Amount); return(res); }