コード例 #1
0
ファイル: Player.cs プロジェクト: tznak/rollback-core
 internal Player(PlayerType playerType, SessionSettings settings)
 {
     _settings         = settings;
     PlayerHandle      = new PlayerHandle(Guid.NewGuid().GetHashCode(), playerType);
     _savedStates      = new RingBuffer <InputState>(_settings.RollbackWindow);
     LastConfirmedStep = Constants.NULL_STEP;
     _lastAddedStep    = Constants.NULL_STEP;
 }
コード例 #2
0
ファイル: Session.cs プロジェクト: tznak/rollback-core
        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);