示例#1
0
 private void FireCompleteMatchListingArrived(bool result, string msg, LobbyClient sender)
 {
     if (CompleteMatchListingArrivedInvoker != null)
     {
         CompleteMatchListingArrivedInvoker(result, msg, sender);
     }
 }
示例#2
0
 private void FireQuickMatchResultArrived(bool result, string msg, LobbyClient sender)
 {
     if (QuickMatchResultArrivedInvoker != null)
     {
         QuickMatchResultArrivedInvoker(result, msg, sender);
     }
 }
示例#3
0
 public LobbyClient()
     : base()
 {
     Factory.Instance.Register(typeof(Game), () => { return new Game(); });
     m_Instance = this;
     m_EmptyGame = new ClientGame(new Game(), this, null);
 }
示例#4
0
        public ClientGame(Game g, LobbyClient client, ClientGameServerOutboundConnection con)
        {
            Connection              = con;
            this.Client             = client;
            this.AbandonedTimestamp = g.AbandonedTimestamp;
            this.Players            = g.Players;
            this.GameID             = g.GameID;
            this.IsShuttingDown     = g.IsShuttingDown;
            this.Observers          = g.Observers;
            this.Owner              = g.Owner;
            this.Properties         = g.Properties;

            RegisterGamePacketHandler((int)LobbyGameMessageSubType.GameInfoNotification, OnGameInfoNotification);
            RegisterGamePacketHandler((int)LobbyGameMessageSubType.GamePropertiesUpdateNotification, OnGamePropertiesUpdate);
            RegisterGamePacketHandler((int)LobbyGameMessageSubType.Chat, OnGameChat);
            RegisterGamePacketHandler((int)LobbyGameMessageSubType.NewOwner, OnNewGameOwner);
        }
示例#5
0
        public ClientGame(Game g, LobbyClient client, ClientGameServerOutboundConnection con)
        {
            Connection = con;
            this.Client = client;
            this.AbandonedTimestamp = g.AbandonedTimestamp;
            this.Players = g.Players;
            this.GameID = g.GameID;
            this.IsShuttingDown = g.IsShuttingDown;
            this.Observers = g.Observers;
            this.Owner = g.Owner;
            this.Properties = g.Properties;

            RegisterGamePacketHandler((int)LobbyGameMessageSubType.GameInfoNotification, OnGameInfoNotification);
            RegisterGamePacketHandler((int)LobbyGameMessageSubType.GamePropertiesUpdateNotification, OnGamePropertiesUpdate);
            RegisterGamePacketHandler((int)LobbyGameMessageSubType.Chat, OnGameChat);
            RegisterGamePacketHandler((int)LobbyGameMessageSubType.NewOwner, OnNewGameOwner);
        }
示例#6
0
 public ClientGameTB(Game g, LobbyClient client, ClientGameServerOutboundConnection con) : base(g, client, con)
 {
     RegisterGamePacketHandler((int)TurnedGameMessageSubType.PhaseUpdate, OnPhaseEntered);
     RegisterGamePacketHandler((int)TurnedGameMessageSubType.TurnOrderUpdate, OnTurnOrderUpdateReceived);
 }
示例#7
0
 private void FireQuickMatchResultArrived(bool result, string msg, LobbyClient sender)
 {
     if (QuickMatchResultArrivedInvoker != null)
     {
         QuickMatchResultArrivedInvoker(result, msg, sender);
     }
 }
示例#8
0
 private void FireCompleteMatchListingArrived(bool result, string msg, LobbyClient sender)
 {
     if (CompleteMatchListingArrivedInvoker != null)
     {
         CompleteMatchListingArrivedInvoker(result, msg, sender);
     }
 }