Пример #1
0
        //public List<Upgrade> Upgrades { get; set; }
        //public ResourceButton ResourceButton { get; set; }

        /*
         *  New Goals:
         *  Add a panel for storing Generators (display and purchase)
         *  Panel should be maintained by a System
         *  System stores a list of added Generators (we have this as GeneratorSystem)
         *  When a new Generator is added, put it in the store
         *  Sort by buy price (we need a buy price)
         *  Fade/Disable/Something when we don't have enough of the required resources
         *  Enable when we do
         *  On Click, add to the right kind of Generator
         */

        public Resource()
        {
            Details = new ResourceDetail()
            {
                Type     = ResourceType.Gold,
                Quantity = 0,
                PerClick = 1,
                Name     = "Gold"
            };

            Generators = new List <Generator>();

            Generators.Add(GeneratorSystem.AddGenerator(new Generator()
            {
                Type            = ResourceType.Gold,
                Quantity        = 1,
                PerPeriod       = 0.1M,
                PeriodDuration  = 1,
                TimeAccumulated = 0,
                BaseName        = "Pickaxe"
            }));

            Generators.Add(GeneratorSystem.AddGenerator(new Generator()
            {
                Type            = ResourceType.Gold,
                Quantity        = 1,
                PerPeriod       = 1,
                PeriodDuration  = 1,
                TimeAccumulated = 0,
                BaseName        = "Miner"
            }));

            BindGenerators();
        }