예제 #1
0
 private void CmdAction(PlayerAction action)
 {
     serverState = NextState(serverState, action);
 }
예제 #2
0
 private void CmdAction(PlayerAction action)
 {
     serverState      = NextState(serverState, action);
     serverStateCache = serverState;
     RpcOnServerStateChange(serverState);
 }
예제 #3
0
 private PlayerState NextState(PlayerState state, PlayerAction action)
 {
     return(new PlayerState {
         MoveNumber = state.MoveNumber + 1, Position = playerMove.GetNextPosition(Vector3Int.RoundToInt(state.Position), action)
     });
 }
예제 #4
0
 public void ProcessAction(PlayerAction action)
 {
     CmdProcessAction(action);
 }
예제 #5
0
 private bool IsPointlessMove(PlayerState state, PlayerAction action)
 {
     return(state.Position.Equals(NextState(state, action).Position));
 }
예제 #6
0
        private bool IsPointlessMove(PlayerState state, PlayerAction action)
        {
            bool change;

            return(state.WorldPosition.Equals(NextState(state, action, out change).WorldPosition));
        }