static int Init(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); Games.Module.Wars.WarEnterData obj = (Games.Module.Wars.WarEnterData)LuaScriptMgr.GetNetObjectSelf(L, 1, "Games.Module.Wars.WarEnterData"); obj.Init(); return(0); }
public void Generation(WarEnterData enterData) { enterData.Init(); this.enterData = enterData; this.ownLegionID = enterData.ownLegionId; #if UNITY_EDITOR Debug.Log("War.isEditor=" + War.isEditor); if (War.isEditor) { this.stageConfig = War.model.Editor_GetStage(enterData.stageId); if (this.stageConfig == null) { this.stageConfig = War.model.GetStage(enterData.stageId).Clone(); War.model.Editor_stageConfigs.Add(this.stageConfig.id, this.stageConfig); } } else { this.stageConfig = War.model.GetStage(enterData.stageId); } #else this.stageConfig = War.model.GetStage(enterData.stageId); #endif Debug.Log("stageConfig=" + stageConfig); Debug.Log("stageConfig.resource=" + stageConfig.resource); Debug.Log("stageConfig.mapConfig=" + stageConfig.mapConfig); Debug.Log("enterData.ownLegionId=" + enterData.ownLegionId); this.mapConfig = stageConfig.mapConfig; War.ownLegionID = enterData.ownLegionId; War.mainLegionID = enterData.mainLegionId = enterData.FindMinLegionId(); War.service.roomId = enterData.roomId; War.service.roleId = enterData.ownRoleId; War.service.ownLegionId = enterData.ownLegionId; this.id = stageConfig.id; this.showHP = stageConfig.showHP; if (War.model.HasWeightConfig(this.id)) { this.weight = War.model.GetWeightConfig(this.id); } War.timeMax = stageConfig.time; begionDelayTime = War.vsmode == VSMode.PVP ? 2 : 0; if (War.isEditor) { War.timeMax = 0; } // War.timeMax = 20; War.timeLimit = War.timeMax > 0f; // if(War.isTest) showHP = false; GenerationLegions(); GenerationSoliders(); GenerationHeros(); GenerationBuilds(); GenerationWalls(); foreach (KeyValuePair <int, LegionData> kvp in legionDict) { kvp.Value.Init(); } InitAttachPropData(); InitUseSkillBuildId(); }