internal ResearchCompleteController(Player owner, ResearchTopic topic, GameController gameController, MainGame game)
        {
            this.game           = game;
            this.gameController = gameController;
            this.Owner          = owner;
            this.TopicProgress  = this.game.States.ResearchAdvances.Of[owner].First(x => x.Topic == topic);

            this.priorities.AddRange(this.TopicProgress.Topic.Unlocks[this.TopicProgress.NextLevel]);
        }
Esempio n. 2
0
        internal ResearchTopicInfo(ResearchProgress tech, ResearchResult investmentResult, IEnumerable <DevelopmentTopic> developmentTopics)
        {
            this.topic    = tech.Topic;
            this.textVars = new Var(DevelopmentTopic.LevelKey, tech.NextLevel).Get;

            this.Cost           = tech.Topic.Cost.Evaluate(textVars);
            this.InvestedPoints = tech.InvestedPoints;
            this.Investment     = investmentResult.InvestedPoints;
            this.Level          = tech.Level;
            this.NextLevel      = investmentResult.CompletedCount > 1 ? tech.Level + (int)investmentResult.CompletedCount : tech.NextLevel;
            this.Unlocks        = tech.Topic.Unlocks[tech.NextLevel].Select(id => new DevelopmentTopicInfo(new DevelopmentProgress(
                                                                                                               developmentTopics.First(x => x.IdCode == id), tech.Owner)
                                                                                                           )).ToArray();
        }
Esempio n. 3
0
 internal TechnologyGeneralInfo(ResearchTopic data)
 {
     this.imagePath    = data.ImagePath;
     this.maxLevel     = data.MaxLevel;
     this.languageCode = data.LanguageCode;
 }