示例#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));
        }