Example #1
0
 public void SetTurretResult(Entity turret, float expReward, int previousUpgradeLevel, int[] levels, BattleResultsTextTemplatesComponent textTemplates)
 {
     this.turretResult.SetProgress(turret, expReward, previousUpgradeLevel, levels, textTemplates);
 }
Example #2
0
 public void SetHullResult(Entity hull, float expReward, int previousUpgradeLevel, int[] levels, BattleResultsTextTemplatesComponent textTemplates)
 {
     this.hullResult.SetProgress(hull, expReward, previousUpgradeLevel, levels, textTemplates);
 }
Example #3
0
 public void SetExperienceResult(float expReward, int[] levels, BattleResultsTextTemplatesComponent textTemplates)
 {
     this.experienceResult.SetProgress(expReward, levels, textTemplates);
 }
Example #4
0
 protected void SetProgress(float expReward, int[] levels, LevelInfo currentLevelInfo, BattleResultsTextTemplatesComponent textTemplates)
 {
     this.currentLevelInfo  = currentLevelInfo;
     this.previousLevelInfo = LevelInfo.Get(currentLevelInfo.AbsolutExperience - ((long)expReward), levels);
     if (this.previousLevelInfo.IsMaxLevel)
     {
         this.experienceProgress.Set(1f, 1f);
         this.expRewardUI.text = string.Empty;
     }
     else
     {
         this.previousProgress = Mathf.Clamp01(((float)this.previousLevelInfo.Experience) / ((float)this.previousLevelInfo.MaxExperience));
         this.experienceProgress.Set(this.previousProgress, this.previousProgress);
         this.isLevelUp        = currentLevelInfo.Level > this.previousLevelInfo.Level;
         this.nextLevel        = this.previousLevelInfo.Level + 1;
         this.expRewardUI.text = string.Format(textTemplates.EarnedExperienceTextTemplate, expReward);
     }
 }
Example #5
0
        public void SetProgress(Entity itemEntity, float expReward, int previousUpgradeLevel, int[] levels, BattleResultsTextTemplatesComponent textTemplates)
        {
            TankPartItem item = GarageItemsRegistry.GetItem <TankPartItem>(itemEntity.GetComponent <MarketItemGroupComponent>().Key);

            this.name.text = item.Name;
            bool      flag2            = item.UpgradeLevel == UpgradablePropertiesUtils.MAX_LEVEL;
            LevelInfo currentLevelInfo = LevelInfo.Get((previousUpgradeLevel != UpgradablePropertiesUtils.MAX_LEVEL) ? (!flag2 ? ((long)item.AbsExperience) : ((long)levels[levels.Length - 1])) : (levels[levels.Length - 1] + ((long)expReward)), levels);

            base.SetProgress(expReward, levels, currentLevelInfo, textTemplates);
        }
        public void SetProgress(float expReward, int[] levels, BattleResultsTextTemplatesComponent textTemplates)
        {
            LevelInfo currentLevelInfo = this.SendEvent <GetUserLevelInfoEvent>(SelfUserComponent.SelfUser).Info;

            base.SetProgress(expReward, levels, currentLevelInfo, textTemplates);
        }