Esempio n. 1
0
        static Play()
        {
            peer              = new PlayPeer();
            Player            = new Player(peer);
            lobby             = new PlayLobby();
            EevntMessageQueue = new Queue <PlayEventMessage>();
            Play.OnPlayEvent += InvokeEvent;

            Play.SubscribeNoticeReceived(new PlayRPCListener());
            Play.SubscribeNoticeReceived(new RoomJoinListener());
            Play.SubscribeNoticeReceived(new RoomOnlineListener());
            Play.SubscribeNoticeReceived(new RoomOfflineListener());
            Play.SubscribeNoticeReceived(new RoomUpdateListener());
            Play.SubscribeNoticeReceived(new RoomLeftListener());
            Play.SubscribeNoticeReceived(new RoomMasterClientSwitchListener());
            Play.SubscribeNoticeReceived(new PlayerPropertyListener());
            Play.SubscribeNoticeReceived(new RoomOpenListener());
            Play.SubscribeNoticeReceived(new RoomVisibleListener());
            Play.StartListen();

            Play.RegisterSynchronousObjectType <PlayRoom>();
            Play.RegisterSynchronousObjectType <Player>();
            Play.RegisterSynchronousObjectType <PlayLobby>();
        }
Esempio n. 2
0
 internal Player(PlayPeer peer) : this(peer, null)
 {
 }
Esempio n. 3
0
 internal Player(PlayPeer peer, PlayRoom room) : this()
 {
     Peer = peer;
     SetRoom(room);
 }