IEnumerator corFogLift(DramaSection script) { BKTools.FogLift(script.to_grid_id, script.v_int + GameRule.Default_PvE_Fog_Lift_Range, GameRule.Default_PvE_Fog_Lift_Range, GameRule.ePlayerIndex); yield return(new WaitForSeconds(1f)); analya_finish = true; yield return(null); }
IEnumerator corShowArea(DramaSection section) { //开放活动区域 foreach (var item in Main.Inst.lv_ctrl.map_data.list_area_grid[section.area_id].list) { //驱散迷雾 BKTools.FogLift(item, 1, GameRule.Default_PvE_Fog_Lift_Range, GameRule.ePlayerIndex); //记录已探索 Main.Inst.lv_ctrl.AreaExplored.Add(item); } analya_finish = true; yield return(null); }
IEnumerator corExploreContinue(DramaSection section) { Main.Inst.addDancer(KEYExCont); // 展示战斗成果 Main.Inst.panBattleSummary.Show(); yield return(new WaitUntil(BKTools.ISCWithArgu(KEYExCont))); //开放活动区域 TODO 关闭战斗区域特效 foreach (var item in Main.Inst.lv_ctrl.AreaBattle) { //驱散迷雾 BKTools.FogCover(item, 1, GameRule.ePlayerIndex); } //恢复探索区域 yield return(new WaitUntil(BKTools.ISCWithArgu(KEYExCont))); //清理战斗人员 foreach (var chess in Main.Inst.dic_chess) { chess.Value.container.removeChess(); chess.Value.gameObject.SetActive(false); } // 召回探索骑士 Main.Inst.moving_chess = Main.Inst.now_turnphase.setChess(1001, ePlayer.Player1, Main.Inst.chess_grids[Main.Inst.lv_ctrl.ExplorePos], section.my_argu_AI_ID, false, GameRule.PlayerChessEventID, 0); Main.Inst.b_moving_chess = true; //开放活动区域 foreach (var item in Main.Inst.lv_ctrl.AreaExplored) { //驱散迷雾 BKTools.FogLift(item, 1, GameRule.Default_PvE_Fog_Lift_Range, GameRule.ePlayerIndex); } yield return(new WaitUntil(BKTools.ISCWithArgu(KEYExCont))); // 切换阶段 —— 被清理后自动接上探索 if (Main.Inst.now_turnphase.nextPhaseDefault.gameObject.scene.name != null) { Destroy(Main.Inst.now_turnphase.nextPhaseDefault.gameObject); } Main.Inst.now_turnphase.nextPhaseDefault = Main.Inst.explore_phase; analya_finish = true; Main.Inst.redDancer(KEYExCont); }
//探索开始 IEnumerator corExploreStart(DramaSection section) { //开房活动区域 foreach (var item in Main.Inst.lv_ctrl.map_data.list_area_grid[section.area_id].list) { //驱散迷雾 BKTools.FogLift(item, 1, GameRule.Default_PvE_Fog_Lift_Range, GameRule.ePlayerIndex); //记录已探索 Main.Inst.lv_ctrl.AreaExplored.Add(item); } //召唤王 int temp_lord_id = 1001; ePlayer belong = section.belong; ChessContainer grid = Main.Inst.chess_grids[section.to_grid_id]; //创建棋子 Main.Inst.moving_chess = Main.Inst.now_turnphase.setChess(temp_lord_id, ePlayer.Player1, grid, section.my_argu_AI_ID, false, GameRule.PlayerChessEventID, 0); //设置镜头跟踪方式 Camera.main.GetComponent <ExBaCamera>().SetFollowTarget(Main.Inst.moving_chess); analya_finish = true; yield return(null); }
IEnumerator corBattleStart(DramaSection section) { Main.Inst.addDancer(KEY_corBattleStart); Main.Inst.lv_ctrl.now_turn = 0; // 重新计算回合数 //存储探索进度 Main.Inst.lv_ctrl.ExplorePos = Main.Inst.moving_chess.container.number; // 遮盖已开放区域 foreach (var item in Main.Inst.lv_ctrl.AreaExplored) { BKTools.FogCover(item, 1, GameRule.ePlayerIndex); } yield return(new WaitUntil(BKTools.ISCWithArgu(KEY_corBattleStart))); //隐藏探索骑士 //Main.Inst.moving_chess.container.removeChess(); //Main.Inst.moving_chess.gameObject.SetActive(false); // 开放战斗区域 foreach (var item in Main.Inst.lv_ctrl.map_data.list_area_grid[section.area_id].list) { Main.Inst.lv_ctrl.AreaBattle.Add(item); BKTools.FogLift(item, 1, GameRule.Default_PvE_Fog_Lift_Range, GameRule.ePlayerIndex); } // 召唤玩家默认阵容 //TODO 从牌组设置读取 Main.Inst.moving_chess.container.removeChess(); Main.Inst.chess_grids[section.to_grid_id].appendChess(Main.Inst.moving_chess); //setChessPlayer(1001, ePlayer.Player1, Main.Inst.chess_grids[section.to_grid_id]); Debug.Log("草拟吗,到底能不能玩断点啦!"); // 切换阶段 (不能使用插入,不然会使得当前不止一个阶段对象响应事件——已经造成过召唤剧情成功生成未执行时被认为已经被杀光的错误 AppendPhase(Instantiate(BKTools.LoadAsset <GameObject>(eResBundle.Prefabs, PrefabPath.PlayerDrawPhase), Main.Inst.NodePhaseControler.transform).GetComponent <TurnPhase>()); Main.Inst.redDancer(KEY_corBattleStart); //召唤怪物阵容 - 由原来的事件机制完成 //设置镜头跟踪方式 Camera.main.GetComponent <ExBaCamera>().SetFollowTarget(section.area_id); analya_finish = true; }