public void PlayEliminate(List <MonsterAnimInfo> monsterAnimss, ActionTree actionTree) { for (int j = 0; j < monsterAnimss.Count; j++) { OrderAction order = new OrderAction(); MonsterAnimInfo monsterAnimInfo = monsterAnimss[j]; FightMonsterItem item = GetItemByRunId(monsterAnimInfo.monsterInfo.runId); switch (monsterAnimInfo.animationType) { case CellAnimType.clear: order.AddNode(new ShowEffectActor(item.transform, "effect_cell_bomb", fightModule.transform)); order.AddNode(new PlaySoundActor("remove")); order.AddNode(new ScaleActor((RectTransform)item.transform, new Vector3(0, 0, 0), 0.1f)); order.AddNode(new DestroyActor(item.gameObject)); break; case CellAnimType.wreck: order.AddNode(new ShowEffectActor(item.transform, "effect_cell_bomb", fightModule.transform)); order.AddNode(new PlaySoundActor("remove")); order.AddNode(new ScaleActor((RectTransform)item.transform, new Vector3(0, 0, 0), 0.1f)); //if (monsterAnimInfo.monsterInfo.IsNull()) //{ // order.AddNode(new DestroyActor(item.gameObject)); //}else //{ order.AddNode(new ChangeMonsterActor(item, monsterAnimInfo.monsterInfo)); //} break; } actionTree.AddNode(order); } }
public void Flow(ActionTree actionTree) { CoverModel.Instance.Flow(); List <CoverAnimInfo> anims = CoverModel.Instance.anims[0]; for (int i = 0; i < anims.Count; i++) { CoverAnimInfo animInfo = anims[i]; FightCoverItem item = GetItemByRunId(animInfo.coverInfo.runId); if (item != null) { ParallelAction paralle = new ParallelAction(); Vector2 toPos = PosMgr.GetFightCellPos(animInfo.coverInfo.posX, animInfo.coverInfo.posY); paralle.AddNode(new MoveActor((RectTransform)item.transform, new Vector3(toPos.x, toPos.y, 0), 0, 0.3f)); OrderAction orderAction = new OrderAction(); orderAction.AddNode(new ScaleActor((RectTransform)item.transform, new Vector3(0.5f, 0.5f, 1), 0.1f)); orderAction.AddNode(new WaitActor(100)); orderAction.AddNode(new ScaleActor((RectTransform)item.transform, new Vector3(1, 1, 1), 0.1f)); paralle.AddNode(orderAction); actionTree.AddNode(paralle); } } }
public void PlayEliminate(List <CoverAnimInfo> coverAnimss, ActionTree actionTree) { for (int j = 0; j < coverAnimss.Count; j++) { OrderAction order = new OrderAction(); CoverAnimInfo coverAnimInfo = coverAnimss[j]; FightCoverItem item = GetItemByRunId(coverAnimInfo.coverInfo.runId); switch (coverAnimInfo.animationType) { case CellAnimType.clear: order.AddNode(new ShowEffectActor(item.transform, "effect_cell_bomb", fightModule.transform)); order.AddNode(new PlaySoundActor("remove")); order.AddNode(new ScaleActor((RectTransform)item.transform, new Vector3(0, 0, 0), 0.1f)); order.AddNode(new DestroyActor(item.gameObject)); break; case CellAnimType.wreck: order.AddNode(new ShowEffectActor(item.transform, "effect_cell_bomb", fightModule.transform)); order.AddNode(new PlaySoundActor("remove")); order.AddNode(new ScaleActor((RectTransform)item.transform, new Vector3(0, 0, 0), 0.1f)); order.AddNode(new ChangeCoverActor(this, item, coverAnimInfo.coverInfo)); break; } actionTree.AddNode(order); } }
public void PlayEliminate(List <FloorAnimInfo> floorAnimss, ActionTree actionTree) { for (int j = 0; j < floorAnimss.Count; j++) { OrderAction order = new OrderAction(); FloorAnimInfo floorAnimInfo = floorAnimss[j]; FightFloorItem item = GetItemByRunId(floorAnimInfo.floorInfo.runId); order.AddNode(new ScaleActor((RectTransform)item.transform, new Vector3(0, 0, 0), 0.1f)); order.AddNode(new DestroyActor(item.gameObject)); actionTree.AddNode(order); } }
public void PlayEliminate(List <WallAnimInfo> wallAnimss, ActionTree actionTree) { for (int j = 0; j < wallAnimss.Count; j++) { WallAnimInfo moveInfo = wallAnimss[j]; FightFanceItem item = GetItemByRunId(moveInfo.toInfo.runId); if (item != null) { OrderAction order = new OrderAction(); order.AddNode(new ShowEffectActor(item.transform, "effect_wall_wreck", fightModule.transform)); order.AddNode(new PlaySoundActor("wreck")); order.AddNode(new ScaleActor((RectTransform)item.transform, new Vector3(0, 0, 0), 0.1f)); order.AddNode(new ChangeFanceActor(item, moveInfo.toInfo)); actionTree.AddNode(order); } } }