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 void ProcessActions() { this._actions.Switch(); _DTO_action_info[] actions = new _DTO_action_info[this._actions.count]; int i = 0; while (!this._actions.isEmpty) { actions[i++] = this._actions.Pop(); } this.Brocast(ProtocolManager.PACKET_BATTLE_ACMD_FRAME(actions, this._frame)); }
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; } } } }
public void HandleAxisInput(Vector2 axis) { if (CPlayer.instance == null || CPlayer.instance.mazeResult != Champion.MazeResult.Nan) { return; } axis.x = ( int )(axis.x * 100f) * 0.01f; axis.y = ( int )(axis.y * 100f) * 0.01f; if (Env.useNetwork) { _DTO_action_info dto = ProtocolManager.DTO_action_info(CPlayer.instance.rid, ( byte )FrameActionType.Move, axis.x, 0f, axis.y); FrameActionManager.SetFrameAction(dto); } else { BattleManager.lBattle.HandleBeginMove(CPlayer.instance.rid, new FVec3(axis.x, 0, axis.y)); } }
public static void SetFrameAction(_DTO_action_info action) { ACTIONS.Add(action); }