コード例 #1
0
        public void SetTrainingTime(double time)
        {
            TrainingTime   = time;
            IsTrainingDone = false;

            trainingCounter.Start(TrainingTime);
        }
コード例 #2
0
        public void SetUpgradeTime(double time)
        {
            UpgradeTime   = time;
            IsUpgradeDone = false;

            upgCounter.Start(UpgradeTime);
        }
コード例 #3
0
        public void SetResearchTime(double time)
        {
            ResearchTime   = time;
            IsResearchDone = false;

            researchCounter.Start(ResearchTime);
        }
コード例 #4
0
        public void Initalize()
        {
            researchCounter = new AsyncCounter();
            IsResearchDone  = !(ResearchTime > 0);
            if (!IsResearchDone)
            {
                researchCounter.Start(ResearchTime);
            }

            upgCounter    = new AsyncCounter();
            IsUpgradeDone = !(UpgradeTime > 0);
            if (!IsUpgradeDone)
            {
                upgCounter.Start(UpgradeTime);
            }

            trainingCounter = new AsyncCounter();
            IsTrainingDone  = !(TrainingTime > 0);
            if (!IsTrainingDone)
            {
                trainingCounter.Start(TrainingTime);
            }
        }