コード例 #1
0
 internal Player(PlayerType playerType)
 {
     PlayerHandle       = new PlayerHandle(Guid.NewGuid().GetHashCode(), playerType);
     _savedStates       = new RingBuffer <InputState>(Constants.FRAME_BUFFER_SIZE);
     LastConfirmedFrame = Constants.NULL_FRAME;
     _lastAddedFrame    = Constants.NULL_FRAME;
 }
コード例 #2
0
        private Player <TInputState> GetPlayer(PlayerHandle playerHandle)
        {
            foreach (var player in _players)
            {
                if (player.PlayerHandle == playerHandle)
                {
                    return(player);
                }
            }

            Debug.Assert(false, "Could not get Player from PlayerHandle");
            return(default);