コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
ファイル: BuildConfig.cs プロジェクト: PenpenLi/abcabcabc.mg
        public void AddLevelConfig(BuildLevelConfig levelConfig)
        {
            levels.Add(levelConfig.level, levelConfig);

            if (maxLevel < levelConfig.level)
            {
                maxLevel = levelConfig.level;
            }
        }
コード例 #3
0
ファイル: WarModel.cs プロジェクト: PenpenLi/abcabcabc.mg
        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);
        }