コード例 #1
0
        internal MultiplayerMatch CreateMultiplayerMatch(MatchListing matchListing)
        {
            MultiplayerMatch match = new MultiplayerMatch("match-" + this.GetNextMatchId(), matchListing.LevelData);

            if (this.MultiplayerMatches.TryAdd(match.Name, match))
            {
                return(match);
            }

            return(null);
        }
コード例 #2
0
        internal MatchPlayer(MultiplayerMatch match, UserData userData, uint socketId, IPAddress ipAddress)
        {
            this.Match    = match;
            this.UserData = userData;

            this.SocketId  = socketId;
            this.IPAddress = ipAddress;

            this._Speed = (int)userData.Speed;
            this._Accel = (int)userData.Accel;
            this._Jump  = (int)userData.Jump;

            this._Hats = new Queue <MatchPlayerHat>();

            this.ToUpdate = UpdateStatus.None;
        }
コード例 #3
0
 internal void Die(MultiplayerMatch match)
 {
     this.MultiplayerMatches.TryRemove(match.Name, out _);
 }
コード例 #4
0
 internal MultiplayerMatchSession(MultiplayerMatch match, MatchPlayer player)
 {
     this.Match       = match;
     this.MatchPlayer = player;
 }