예제 #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 += () => {
            //...
            //};
        }
예제 #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>();
        }
예제 #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);
        }
예제 #4
0
        protected override BaseResource Multi(int n)
        {
            Crystals res = new Crystals(Amount * n);

            return(res);
        }
예제 #5
0
        protected override BaseResource Sub(BaseResource b)
        {
            Crystals res = new Crystals(Amount - b.Amount);

            return(res);
        }