//索引怪物模型资源 private void IndexMonsterModel() { if (!SceneManager.Inst.NextloadScene.ToString().Contains("Battle")) { return; } CampaignMonsterGroupData pData = ObjectSelf.GetInstance().GetMonsterGroupData(); if (pData != null) { for (int i = 0; i < GlobalMembers.MAX_CAMPAIGN_MONSTER_GROUP; i++) { for (int j = 0; j < GlobalMembers.MAX_MONSTER_GROUP_COUNT; ++j) { if (DataTemplate.GetInstance().m_MonsterTable.tableContainsKey(pData.IDs[i, j])) { int nTableID = pData.IDs[i, j]; MonsterTemplate _rowData = (MonsterTemplate)DataTemplate.GetInstance().m_MonsterTable.getTableData(nTableID); IndexModel(_rowData); IndexSkillmodel(_rowData); } } } } }
/// <summary> /// 初始化关卡中的怪物信息 /// </summary> private void InitCampaignMonsterGroupData() { CampaignMonsterGroupData _monsterGroupData = new CampaignMonsterGroupData(); _monsterGroupData.IDs[0, 0] = GlobalMembers.SPELL_SHOW_MONTER_ID; _monsterGroupData.Count = 1; ObjectSelf.GetInstance().OnCacheMonsterGroupData(_monsterGroupData, -1); }
public override void Process() { CampaignMonsterGroupData pMonsterGroupData = new CampaignMonsterGroupData(); byte nGroup = 0; int nIndex = 0; foreach (int value in battleinfo.monstergroup) { if (nIndex >= GlobalMembers.MAX_MONSTER_GROUP_COUNT || nGroup >= GlobalMembers.MAX_CAMPAIGN_MONSTER_GROUP) { continue; } if (value != 0) { pMonsterGroupData.IDs[nGroup, nIndex] = value; nIndex++; } else { //用0表示每波怪物的分界标示 [4/1/2015 Zmy] nIndex = 0;//重设索引 nGroup++; } } List <int> _indroplist = new List <int>(); foreach (int value in battleinfo.indroplist) { _indroplist.Add(value); } pMonsterGroupData.Count = ++nGroup;//总波数 [4/1/2015 Zmy] ObjectSelf.GetInstance().OnCacheMonsterGroupData(pMonsterGroupData, battleinfo.battleid); ObjectSelf.GetInstance().OnCacheCurrentBattleReward(battleinfo.heroexp, battleinfo.teamexp, battleinfo.tili, 0, _indroplist); ObjectSelf.GetInstance().BattleStageData.CheckSpecialStageData(battleinfo.battleid); SceneManager.Inst.EnterBattleScene(battleinfo.battleid); //if(_indroplist.Count > 0) //{ // for (int i = 0; i < _indroplist.Count; i++) // { // InnerdropTemplate _inner = (InnerdropTemplate)DataTemplate.GetInstance().m_InnerdropTable.getTableData(_indroplist[i]); // if (_inner.getDropparameter1() != -1) // { // Debug.Log("haole "); // } // } //} }
public override void Process() { if (result == END_ERROR) { } else { CampaignMonsterGroupData pMonsterGroupData = new CampaignMonsterGroupData(); int nGroup = battleinfo.groupnum - 1;//默认初始第一轮为1.对应数组索引-1; int nIndex = 0; foreach (int value in battleinfo.monstergroup) { if (nIndex >= GlobalMembers.MAX_MONSTER_GROUP_COUNT || nGroup >= GlobalMembers.MAX_CAMPAIGN_MONSTER_GROUP) { continue; } if (value != 0) { pMonsterGroupData.IDs[nGroup, nIndex] = value; nIndex++; } } pMonsterGroupData.Count = GlobalMembers.MAX_CAMPAIGN_MONSTER_GROUP; //极限试炼最大波数 for (int i = 1; i <= GlobalMembers.MAX_TEAM_CELL_COUNT; i++) //初始化英雄阵型信息 { if (battleinfo.useherokeylist.ContainsKey(i)) { if ((int)battleinfo.useherokeylist[i] != 0) { ObjectSelf.GetInstance().LimitFightMgr.m_HeroInfo[i - 1].GUID_value = (int)battleinfo.useherokeylist[i]; } } } ObjectSelf.GetInstance().OnCacheMonsterGroupData(pMonsterGroupData, battleinfo.battleid); ObjectSelf.GetInstance().LimitFightMgr.m_TroopType = battleinfo.trooptype; ObjectSelf.GetInstance().LimitFightMgr.m_MonsterTroopType = battleinfo.monstertrooptype; ObjectSelf.GetInstance().LimitFightMgr.m_BeginRoundNum = battleinfo.groupnum; ObjectSelf.GetInstance().LimitFightMgr.m_bStartEnter = true; ObjectSelf.GetInstance().LimitFightMgr.m_RoundNum = battleinfo.groupnum; ObjectSelf.GetInstance().LimitFightMgr.RoundOverProcess(attrinfo); SceneManager.Inst.EnterBattleScene(battleinfo.battleid); } }
public override void Process() { if (result == END_ERROR) { GameEventDispatcher.Inst.dispatchEvent(GameEventID.U_GameTips, "#0000045"); } else { CampaignMonsterGroupData pMonsterGroupData = new CampaignMonsterGroupData(); int nGroup = battleinfo.groupnum - 1;//默认初始第一轮为1.对应数组索引-1; int nIndex = 0; if (battleinfo.monstergroup.Count > 0)// [6/17/2015 Zmy] { foreach (int value in battleinfo.monstergroup) { if (nIndex >= GlobalMembers.MAX_MONSTER_GROUP_COUNT || nGroup >= GlobalMembers.MAX_CAMPAIGN_MONSTER_GROUP) { continue; } if (value != 0) { pMonsterGroupData.IDs[nGroup, nIndex] = value; nIndex++; //极限试炼后面的怪物动态加载,后期看运行效果再选择其他方式优化 [6/17/2015 Zmy] AssetLoader.Inst.DynamicLoadLimitMonsterRes(value); } } } pMonsterGroupData.Count = GlobalMembers.MAX_CAMPAIGN_MONSTER_GROUP;//极限试炼最大波数 ObjectSelf.GetInstance().OnCacheMonsterGroupData(pMonsterGroupData, battleinfo.battleid); SceneObjectManager.GetInstance().UpdateMonsterGroupData(); ObjectSelf.GetInstance().LimitFightMgr.m_TroopType = battleinfo.trooptype; ObjectSelf.GetInstance().LimitFightMgr.m_MonsterTroopType = battleinfo.monstertrooptype; ObjectSelf.GetInstance().LimitFightMgr.m_RoundNum = battleinfo.groupnum; ObjectSelf.GetInstance().LimitFightMgr.RoundOverProcess(attrinfo, false); GameEventDispatcher.Inst.dispatchEvent(GameEventID.F_LimitBoutEnd); } }
public override void Process() { if (result == END_ERROR) { } else { CampaignMonsterGroupData pMonsterGroupData = new CampaignMonsterGroupData(); byte nGroup = 0; int nIndex = 0; foreach (int value in battleinfo.monstergroup) { if (nIndex >= GlobalMembers.MAX_MONSTER_GROUP_COUNT || nGroup >= GlobalMembers.MAX_CAMPAIGN_MONSTER_GROUP) continue; if (value != 0) { pMonsterGroupData.IDs[nGroup, nIndex] = value; nIndex++; } else { //用0表示每波怪物的分界标示 [4/1/2015 Zmy] nIndex = 0;//重设索引 nGroup++; } } pMonsterGroupData.Count = ++nGroup; //总波数 ObjectSelf.GetInstance().OnCacheMonsterGroupData(pMonsterGroupData, battleinfo.battleid); ObjectSelf.GetInstance().WorldBossMgr.m_bStartEnter = true; ObjectSelf.GetInstance().WorldBossMgr.m_CurBossHP = battleinfo.bossnowhp; ObjectSelf.GetInstance().WorldBossMgr.m_CurBossDataKey = battleinfo.bossid; SceneManager.Inst.EnterBattleScene(battleinfo.battleid); } }