private void CmdAction(PlayerAction action) { serverState = NextState(serverState, action); }
private void CmdAction(PlayerAction action) { serverState = NextState(serverState, action); serverStateCache = serverState; RpcOnServerStateChange(serverState); }
private PlayerState NextState(PlayerState state, PlayerAction action) { return(new PlayerState { MoveNumber = state.MoveNumber + 1, Position = playerMove.GetNextPosition(Vector3Int.RoundToInt(state.Position), action) }); }
public void ProcessAction(PlayerAction action) { CmdProcessAction(action); }
private bool IsPointlessMove(PlayerState state, PlayerAction action) { return(state.Position.Equals(NextState(state, action).Position)); }
private bool IsPointlessMove(PlayerState state, PlayerAction action) { bool change; return(state.WorldPosition.Equals(NextState(state, action, out change).WorldPosition)); }