Ejemplo n.º 1
0
 private void OnAcceptInvite(string senderName, int senderId)
 {
     if (this.Game.AvailablePositions < 1)
     {
         this.SendMessage(senderName, SpaceSiegeLobbyMessages.Full, new object[0]);
     }
     else
     {
         SpaceSiegeGameParticipant item = new SpaceSiegeGameParticipant(this.Game, senderName, senderId);
         item.Position = this.Game.NextAvailablePosition();
         this.SendMessage(SpaceSiegeLobbyMessages.ParticipantInfo, new object[] { item.ToDataString() });
         this.Game.Members.Add(item);
         this.ParticipantPanels[item.Position].SetParticipant(item);
         this.SendMessage(senderName, SpaceSiegeLobbyMessages.Game, new object[] { this.Game.ToDataString() });
         this.chatPanel.SystemEvent("{0} has joined the game lobby.", new object[] { senderName });
         this.UpdateLaunchAbility();
         this.UpdateHostedGameRecord();
     }
 }