Ejemplo n.º 1
0
        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 += () => {
            //...
            //};
        }
Ejemplo n.º 2
0
        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>();
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        protected override BaseResource Multi(int n)
        {
            Crystals res = new Crystals(Amount * n);

            return(res);
        }
Ejemplo n.º 5
0
        protected override BaseResource Sub(BaseResource b)
        {
            Crystals res = new Crystals(Amount - b.Amount);

            return(res);
        }