private static void HandleAction(_DTO_frame_info dto) { int count = dto.actions.Length; for (int i = 0; i < count; i++) { _DTO_action_info action = dto.actions[i]; if (action.sender == CPlayer.instance.rid) { SyncEvent.HandleFrameAction(); } FrameActionType type = ( FrameActionType )action.type; switch (type) { case FrameActionType.Move: { lBattle.HandleBeginMove(action.sender, new FVec3(action.x, action.y, action.z)); } break; case FrameActionType.UseItem: { lBattle.HandleUseItem(action.sender); } break; } } }
private static void HandleAction(_DTO_frame_info dto) { int count = dto.actions.Length; for (int i = 0; i < count; i++) { _DTO_action_info action = dto.actions[i]; if (action.sender == VPlayer.instance.rid) { SyncEvent.HandleFrameAction(); } FrameActionType type = ( FrameActionType )action.type; switch (type) { case FrameActionType.Idle: break; case FrameActionType.Move: { lBattle.HandleMove(action.sender, new Vec3(action.x, action.y, action.z)); } break; case FrameActionType.Track: { lBattle.HandleTrack(action.sender, action.target); } break; case FrameActionType.UseSkill: { Vector3 targetPoint = new Vector3(action.x, action.y, action.z); lBattle.HandleUseSkill(action.sid, action.src, action.target, targetPoint.ToVec3()); } break; case FrameActionType.Relive: { lBattle.HandleRelive(action.sender); break; } case FrameActionType.UpgradeSkill: { lBattle.HandleUpgradeSkill(action.sender, action.target); break; } } } }