// 创建场景显示对象 public void Build(BattleRoomClient room, Action <BattleReplay> onTimeBackTriggered) { ClearMap(); Room = room; BuildMapGrids(); BuildMapItems(); BuildAvatars(); PreparingOps = new PreparingOps(this); // 准备阶段 InBattleOps = new InBattleOps(this); // 战斗内一般阶段 UseMapItemOps = new UseMapItemOps(this); // 战斗内地形改造阶段 PosSelOps = new PosSelOps(this); // 战斗内释放技能阶段 SkillPreviewOps = new SkillPreviewOps(this); OnTimeBackTriggered = onTimeBackTriggered; // 将场景中心移动到屏幕中心 MapRoot.transform.localPosition = new Vector3(-Map.Width / 2, Map.Height / 2, 0); // 将底部响应操作的层铺满整个屏幕 var sws = SceneWorldSize; MapGround.transform.localPosition = new Vector3(-sws.x / 2, sws.y / 2, 0); MapGround.transform.localScale = new Vector3(sws.x, sws.y, 1); }
public void StartSkill(int cx, int cy, ActiveSkill skill, Action <int, int> onSelPos) { PosSelOps.ShowRange(cx, cy, skill, onSelPos); InBattleOps.RemoveShowAttackRange(); }