public void BuildUplevel(int level) { // Debug.LogFormat("<color=green>BuildSkillUplevel level={0}, this.level={1}</color>", level, this.level); BuildLevelConfig buildLevelConfig = buildConfig.GetLevelConfig(this.level); RemoveBuildModule(buildLevelConfig.basepropConfig); RemoveBuildModule(buildLevelConfig.produceConfig); RemoveBuildModule(buildLevelConfig.turretConfig); RemoveBuildModule(buildLevelConfig.spotConfig); buildLevelConfig = buildConfig.GetLevelConfig(level); AddBuildModule(buildLevelConfig.basepropConfig); AddBuildModule(buildLevelConfig.produceConfig); AddBuildModule(buildLevelConfig.turretConfig); AddBuildModule(buildLevelConfig.spotConfig); this.Props.Calculate(); avatarConfig = buildLevelConfig.avatarConfig; // Debug.Log(avatarConfig); // Debug.Log(avatarConfig.Model); if (unit != null) { if (legionId == War.ownLegionID) { War.textEffect.PlayImage(TextEffectImageType.Uplevel, unit.transform); } } }
public void AddLevelConfig(BuildLevelConfig levelConfig) { levels.Add(levelConfig.level, levelConfig); if (maxLevel < levelConfig.level) { maxLevel = levelConfig.level; } }
public void AddBuildLevelConfig(BuildLevelConfig buildLevelConfig) { BuildConfig buildConfig; if (!buildConfigs.TryGetValue(buildLevelConfig.id, out buildConfig)) { buildConfig = new BuildConfig(); buildConfig.id = buildLevelConfig.id; buildConfig.buildType = buildLevelConfig.buildType; buildConfigs.Add(buildConfig.id, buildConfig); } buildConfig.AddLevelConfig(buildLevelConfig); }