Exemplo n.º 1
0
        public void SuccessWhenUserIsNotInTheLobby()
        {
            //arrange
            var options = Utils.GetDbOptions("AddUserShould_SuccessWhenUserIsNotInTheLobby");

            using (var context = new ApplicationDbContext(options))
            {
                context.Lobbies.Add(new Lobby()
                {
                    ID = 5
                });
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.SaveChanges();
            }
            //act
            using (var context = new ApplicationDbContext(options))
            {
                var lobbyInvitationSenderService = new Mock <ILobbyInvitationSenderService>();
                var service = new LobbyService(context, null, null);
                service.AddUser(5, "test_user");
            }
            //assert
            using (var context = new ApplicationDbContext(options))
            {
                var participation = context.UserParticipationInLobbies.Find(new object[] { 5, "test_user" });
                Assert.NotNull(participation);
                Assert.True(context.Lobbies.Find(5).UserParticipations.Contains(participation));
                Assert.Equal(context.Users.Find("test_user").LobbyParticipation, participation);
            }
        }
Exemplo n.º 2
0
        public void ThrowExceptionWhenUserIsNotInTheLobby()
        {
            //arrange
            var options = Utils.GetDbOptions("RemoveUserShould_ThrowExceptionWhenUserIsNotInTheLobby");

            using (var context = new ApplicationDbContext(options))
            {
                context.Lobbies.Add(new Lobby()
                {
                    ID = 5
                });
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.SaveChanges();
            }
            //act & assert
            using (var context = new ApplicationDbContext(options))
            {
                var chatService = new Mock <IChatService>();
                var service     = new LobbyService(context, null, chatService.Object);
                Assert.Throws <InvalidOperationException>(() => service.RemoveUser(5, "test_user"));
            }
        }
Exemplo n.º 3
0
 public LobbyManagement(Random random, GameService gameService, LobbyService lobbyService, PremiumService premiumService)
 {
     Random         = random;
     GameService    = gameService;
     LobbyService   = lobbyService;
     PremiumService = premiumService;
 }
Exemplo n.º 4
0
        public void SucceedWhenGivenUniqueName()
        {
            //assert
            var   options = Utils.GetDbOptions("CreateLobbyShould_SucceedWhenGivenUniqueName");
            Lobby lobby;

            using (var context = new ApplicationDbContext(options))
            {
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.SaveChanges();
            }
            //act
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, null);
                lobby = service.CreateLobby("test_user", "new_lobby", true);
            }
            //assert
            using (var context = new ApplicationDbContext(options))
            {
                Assert.NotNull(lobby);
                Assert.Equal("new_lobby", lobby.Name);
                Assert.Equal("test_user", lobby.OwnerID);
                Assert.True(lobby.Private);
            }
        }
        public void SetupTest()
        {
            RedisConnectionMock = new Mock <IConnectionMultiplexer>();
            LoggerMock          = new Mock <ILogger <LobbyService> >();
            SubscriberMock      = new Mock <ISubscriber>();
            DatabaseMock        = new Mock <IDatabase>();

            LobbyOptions = new OptionsWrapper <GametekiLobbyOptions>(new GametekiLobbyOptions {
                NodeName = "TestNode"
            });
            TestUsers = new List <LobbyUser>();

            RedisConnectionMock.Setup(c => c.GetSubscriber(It.IsAny <object>())).Returns(SubscriberMock.Object);
            RedisConnectionMock.Setup(c => c.GetDatabase(It.IsAny <int>(), It.IsAny <object>())).Returns(DatabaseMock.Object);

            Service = new LobbyService(RedisConnectionMock.Object, LobbyOptions, LoggerMock.Object);

            for (var i = 0; i < 50; i++)
            {
                var testUser = TestUtils.GetRandomLobbyUser();

                TestUsers.Add(testUser);

                Service.NewUserAsync(testUser);
            }

            SubscriberMock.Reset();
        }
Exemplo n.º 6
0
 public LobbyHub(LobbyService lobbyService, IPlayerServiceClient playerService)
 {
     _lobbyService = lobbyService
                     ?? throw new ArgumentNullException(nameof(lobbyService));
     _playerService = playerService
                      ?? throw new ArgumentNullException(nameof(playerService));
 }
Exemplo n.º 7
0
        public void SucceedWhenLobbyExists()
        {
            //arrange
            var options = Utils.GetDbOptions("RemoveLobbyShould_SucceedWhenLobbyExists");

            using (var context = new ApplicationDbContext(options))
            {
                context.Lobbies.Add(new Lobby()
                {
                    ID      = 5,
                    Name    = "new_lobby",
                    OwnerID = "test_user"
                });
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.SaveChanges();
            }
            //act
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, null);
                service.RemoveLobby(5, "test_user");
            }
            //assert
            using (var context = new ApplicationDbContext(options))
            {
                Assert.Null(context.Lobbies.Find(5));
            }
        }
Exemplo n.º 8
0
        public void ThrowExceptionWhenUserIsAlreadyInTheLobby()
        {
            //arrange
            var options = Utils.GetDbOptions("InviteUserShould_ThrowExceptionWhenUserIsAlreadyInTheLobby");

            using (var context = new ApplicationDbContext(options))
            {
                context.Lobbies.Add(new Lobby()
                {
                    ID = 5
                });
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.UserParticipationInLobbies.Add(new UserParticipationInLobby()
                {
                    UserID  = "test_user",
                    LobbyID = 5
                });
                context.SaveChanges();
            }
            //act & assert
            using (var context = new ApplicationDbContext(options))
            {
                var lobbyInvitationSenderService = new Mock <ILobbyInvitationSenderService>();
                var service = new LobbyService(context, lobbyInvitationSenderService.Object, null);
                Assert.Throws <InvalidOperationException>(() => service.InviteUser(5, "test_user"));
            }
        }
Exemplo n.º 9
0
        public void DoNotHandleUserLeftWhenUserHaveOtherConnections()
        {
            //assert
            var options     = Utils.GetDbOptions("RemoveUserConnectionShould_DoNotHandleUserLeftWhenUserHaveOtherConnections");
            var chatService = new Mock <IChatService>();

            using (var context = new ApplicationDbContext(options))
            {
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.Lobbies.Add(new Lobby()
                {
                    ID = 5
                });
                context.UserParticipationInLobbies.Add(new UserParticipationInLobby()
                {
                    UserID        = "test_user",
                    LobbyID       = 5,
                    ConnectionIds = new HashSet <string> {
                        "otherConnectionId", "connectionId"
                    }
                });
                context.SaveChanges();
            }
            //act
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, chatService.Object);
                service.RemoveUserConnection("test_user", "connectionId");
            }
            //assert
            chatService.Verify(cs => cs.OnUserLeft(It.IsAny <string>(), It.IsAny <string>()), Times.Never());
        }
Exemplo n.º 10
0
        public void HandleUserJoinWhenAddedFirstConnection()
        {
            //assert
            var options     = Utils.GetDbOptions("SaveUserConnectionShould_HandleUserJoinWhenAddedFirstConnection");
            var chatService = new Mock <IChatService>();

            using (var context = new ApplicationDbContext(options))
            {
                context.Users.Add(new User()
                {
                    Id       = "test_user",
                    UserName = "******"
                });
                context.Lobbies.Add(new Lobby()
                {
                    ID = 5
                });
                context.UserParticipationInLobbies.Add(new UserParticipationInLobby()
                {
                    UserID  = "test_user",
                    LobbyID = 5
                });
                context.SaveChanges();
            }
            //act
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, chatService.Object);
                service.SaveUserConnection("test_user", "connectionId");
            }
            //assert
            chatService.Verify(cs => cs.OnUserJoined(
                                   It.Is <string>(username => username == "TestUser"),
                                   It.Is <string>(chatId => chatId == "5")));
        }
Exemplo n.º 11
0
        public void UpdateDatabaseGivenExistingId()
        {
            //arrange
            var options = Utils.GetDbOptions("EditLobbyShould_UpdateDatabaseGivenExistingId");

            using (var context = new ApplicationDbContext(options))
            {
                context.Lobbies.Add(new Lobby
                {
                    ID      = 5,
                    Name    = "Test",
                    Private = false
                });
                context.SaveChanges();
            }
            //act
            using (var context = new ApplicationDbContext(options))
            {
                var chatService = new Mock <IChatService>();
                var service     = new LobbyService(context, null, null);
                service.EditLobby(5, "GoodName", true);
            }
            //assert
            using (var context = new ApplicationDbContext(options))
            {
                Assert.True(context.Lobbies.Find(5).Private);
                Assert.Equal("GoodName", context.Lobbies.Find(5).Name);
            }
        }
Exemplo n.º 12
0
        public void ThrowInvalidOperationExceptionWhenUserIsNotOwnerOfTheLobby()
        {
            //arrange
            var options = Utils.GetDbOptions("RemoveLobbyShould_ThrowInvalidOperationExceptionWhenUserIsNotOwnerOfTheLobby");

            using (var context = new ApplicationDbContext(options))
            {
                context.Lobbies.Add(new Lobby()
                {
                    ID      = 5,
                    Name    = "new_lobby",
                    OwnerID = "test_user"
                });
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.SaveChanges();
            }
            //act & assert
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, null);
                Assert.Throws <InvalidOperationException>(() => service.RemoveLobby(5, "not_owner_id"));
            }
        }
Exemplo n.º 13
0
        static void Main(string[] args)
        {
            WebHttpBinding  binding  = new WebHttpBinding();
            WebHttpBehavior behavior = new WebHttpBehavior();

            GameService  aGameService  = new GameService();
            LobbyService aLobbyService = new LobbyService();

            WebServiceHost aGameHost  = new WebServiceHost(aGameService, new Uri("http://localhost:22415/Lisk/v1/"));
            WebServiceHost aLobbyHost = new WebServiceHost(aLobbyService, new Uri("http://localhost:22415/Lisk/v1/"));

            try
            {
                aGameHost.AddServiceEndpoint(typeof(IGameService), binding, "game");
                aLobbyHost.AddServiceEndpoint(typeof(ILobbyService), binding, "lobby");
                aGameHost.Open();
                aLobbyHost.Open();

                Console.WriteLine(string.Format("Starting GameService {0}\nStarting LobbyService {1}",
                                                ServiceVersion.GameServiceVersion.Version,
                                                ServiceVersion.LobbyServiceVersion.Version));

                Console.WriteLine("Press any key to close...");
            }
            catch (Exception e)
            {
                Console.WriteLine("Error starting Endpoint...");
                Console.WriteLine(e.Message);
            }
            Console.ReadKey();
            Console.WriteLine("Closing...");
            aGameHost.Close();
        }
Exemplo n.º 14
0
 public LobbyHandler(IMapper mapper,
                     LobbyService lobbyService,
                     PlayerService playerService)
 {
     _mapper        = mapper;
     _lobbyService  = lobbyService;
     _playerService = playerService;
 }
Exemplo n.º 15
0
        public void TestGetLobbiesNon()
        {
            var lobbyService = new LobbyService();

            var lobbies = lobbyService.GetLobbies();

            Assert.Empty(lobbies);
        }
Exemplo n.º 16
0
        public void TestCreateLobby()
        {
            var lobbyService = new LobbyService();
            var lobby        = lobbyService.CreateLobby("apples", null);

            Assert.Equal("apples", lobby.Name);
            Assert.Equal(0, lobby.Id);
            Assert.Empty(lobby.Players);
        }
Exemplo n.º 17
0
        public void TestGetLobby()
        {
            var lobbyService = new LobbyService();
            var createdLobby = lobbyService.CreateLobby("apples", null);

            var lobby = lobbyService.GetLobby("apples");

            Assert.Same(createdLobby, lobby);
        }
Exemplo n.º 18
0
            /// <summary>
            /// 작업큐로부터 꺼내 작업 수행
            /// </summary>
            private void Service()
            {
                if (_serviceQueue.Count == 0)
                {
                    return;
                }
                OriginPacket originPacket;

                lock (_locker)
                {
                    originPacket = _serviceQueue.Dequeue();
                }
                Header header = originPacket.Header;

                byte[] data = originPacket.Data;

                Service service = null;
                Packet  packet;

                switch (header.MsgType)
                {
                case Protocol.Register:
                    packet  = JsonManager.BytesToObject <ReceivingRegisterPacket>(data);
                    service = new RegisterService(packet);
                    break;

                case Protocol.Login:
                    packet  = JsonManager.BytesToObject <ReceivingLoginPacket>(data);
                    service = new LoginService(packet);
                    break;

                case Protocol.Lobby:
                    packet  = JsonManager.BytesToObject <ReceivingLobbyPacket>(data);
                    service = new LobbyService(packet);
                    break;

                case Protocol.LobbyChat:
                    packet  = JsonManager.BytesToObject <ReceivingChatPacket>(data);
                    service = new LobbyChatService(packet);
                    break;

                case Protocol.CreateRoom:
                    packet  = JsonManager.BytesToObject <ReceivingCreateRoomPacket>(data);
                    service = new CreateRoomService(packet);
                    break;

                case Protocol.EnterRoom:
                    packet  = JsonManager.BytesToObject <ReceivingEnterRoomPacket>(data);
                    service = new EnterRoomService(packet);
                    break;
                }
                if (service != null)
                {
                    service.Execute();
                }
            }
Exemplo n.º 19
0
        public void TestGetJoinedLobbyNotJoined()
        {
            var lobbyService = new LobbyService();

            lobbyService.CreateLobby("apples", null);

            var lobby = lobbyService.GetJoinedLobby("2");

            Assert.Null(lobby);
        }
Exemplo n.º 20
0
        public void TestGetLobbyNonExisting()
        {
            var lobbyService = new LobbyService();
            var createdLobby = lobbyService.CreateLobby("apples", null);

            var lobby = lobbyService.GetLobby("pears");

            Assert.NotSame(createdLobby, lobby);
            Assert.Null(lobby);
        }
Exemplo n.º 21
0
        public void TestGetLobbies()
        {
            var lobbyService = new LobbyService();

            lobbyService.CreateLobby("apples", null);
            lobbyService.CreateLobby("pears", null);

            var lobbies = lobbyService.GetLobbies();

            Assert.Equal(2, lobbies.Count());
        }
Exemplo n.º 22
0
        public void TestGetJoinedLobby()
        {
            var lobbyService = new LobbyService();
            var lobby        = lobbyService.CreateLobby("apples", null);

            lobby.AddPlayer("name", Color.Blue);

            var joinedLobby = lobbyService.GetJoinedLobby("name");

            Assert.NotNull(joinedLobby);
        }
    public void Awake()
    {
        networkManager = GameObject.Find("NetworkManager");

        networkConnector           = networkManager.GetComponent <MonoTcpNetworkConnector>();
        monoClientMessageProcessor = networkManager.GetComponent <MonoClientMessageProcessor>();
        loggedInUser = networkManager.GetComponent <UserLobbyObject>().GetLoggedInUser();
        lobbyService = new LobbyService(networkConnector, monoClientMessageProcessor, loggedInUser);

        GetAllLobbies();
    }
Exemplo n.º 24
0
 public GameService(LobbyService lobbyService,
                    PhaseService phaseService,
                    ICardGameRepository cardGameRepository,
                    IHubContext <LobbyHub, ILobbyHubClient> lobbyHub,
                    IHubContext <GameHub, IGameHubClient> gameHub)
 {
     this.lobbyService       = lobbyService;
     this.phaseService       = phaseService;
     this.cardGameRepository = cardGameRepository;
     this.lobbyHub           = lobbyHub;
     this.gameHub            = gameHub;
 }
Exemplo n.º 25
0
        public void ThrowExceptionGivenIdOutOfRange()
        {
            //arrange
            var options = Utils.GetDbOptions("EditLobbyShould_ThrowExceptionGivenIdOutOfRange");

            //act & assert
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, null);
                Assert.Throws <ArgumentOutOfRangeException>(() => service.EditLobby(5, "SomeLobby", true));
            }
        }
Exemplo n.º 26
0
        public void ThrowExceptionWhenUserNotFound()
        {
            //assert
            var options     = Utils.GetDbOptions("RemoveUserConnectionShould_ThrowExceptionWhenUserNotFound");
            var chatService = new Mock <IChatService>();

            //act & assert
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, chatService.Object);
                Assert.Throws <ArgumentOutOfRangeException>(() => service.RemoveUserConnection("ghost_user", "connectionId"));
            }
        }
Exemplo n.º 27
0
        public void RemoveConnectionWhenUserParticipatesInLobby()
        {
            //assert
            var options     = Utils.GetDbOptions("RemoveUserConnectionShould_RemoveConnectionWhenUserParticipatesInLobby");
            var chatService = new Mock <IChatService>();

            using (var context = new ApplicationDbContext(options))
            {
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.Lobbies.Add(new Lobby()
                {
                    ID = 5
                });
                context.UserParticipationInLobbies.Add(new UserParticipationInLobby()
                {
                    UserID        = "test_user",
                    LobbyID       = 5,
                    ConnectionIds = new HashSet <string> {
                        "connectionId"
                    }
                });
                context.SaveChanges();
            }
            //act
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, chatService.Object);
                service.RemoveUserConnection("test_user", "connectionId");
            }
            //assert
            using (var context = new ApplicationDbContext(options))
            {
                var connections = context.UserParticipationInLobbies.Find(new object[] { 5, "test_user" }).ConnectionIds;
                Assert.Equal(0, connections.Count);
                chatService.Verify(cs => cs.RemoveConnectionsFromChat(
                                       It.IsAny <ICollection <string> >(),
                                       It.Is <string>(chatId => chatId == "5")));
            }
        }
Exemplo n.º 28
0
        public void ReturnCorrectLobbiesList()
        {
            //arrange
            var options = Utils.GetDbOptions("GetAllPublicOrOnwedLobbiesShould_ReturnCorrectLobbiesList");
            IEnumerable <string> lobbyNamesList;

            using (var context = new ApplicationDbContext(options))
            {
                context.Lobbies.Add(new Lobby()
                {
                    Name = "OurUserPublicLobby", OwnerID = "our_user", Private = false
                });
                context.Lobbies.Add(new Lobby()
                {
                    Name = "OtherUserPublicLobby", OwnerID = "other_user", Private = false
                });
                context.Lobbies.Add(new Lobby()
                {
                    Name = "OurUserPrivateLobby", OwnerID = "our_user", Private = true
                });
                context.Lobbies.Add(new Lobby()
                {
                    Name = "OtherUserPrivateLobby", OwnerID = "other_user", Private = true
                });
                context.SaveChanges();
            }
            //act
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, null);
                lobbyNamesList = from l in service.GetAllPublicOrOwnedLobbies("our_user")
                                 select l.Name;
            }
            //assert
            using (var context = new ApplicationDbContext(options))
            {
                Assert.Contains("OurUserPublicLobby", lobbyNamesList);
                Assert.Contains("OtherUserPublicLobby", lobbyNamesList);
                Assert.Contains("OurUserPrivateLobby", lobbyNamesList);
                Assert.DoesNotContain("OtherUserPrivateLobby", lobbyNamesList);
            }
        }
Exemplo n.º 29
0
        public void ThrowArgumentOutOfRangeExceptionWhenLobbyDoesNotExists()
        {
            //arrange
            var options = Utils.GetDbOptions("RemoveLobbyShould_ThrowArgumentOutOfRangeExceptionWhenLobbyDoesNotExists");

            using (var context = new ApplicationDbContext(options))
            {
                context.Users.Add(new User()
                {
                    Id = "test_user"
                });
                context.SaveChanges();
            }
            //act & assert
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, null);
                Assert.Throws <ArgumentOutOfRangeException>(() => service.RemoveLobby(1, "test_user"));
            }
        }
Exemplo n.º 30
0
        public void ThrowExceptionGivenUserIdOutOfRange()
        {
            //arrange
            var options = Utils.GetDbOptions("AddUserShould_ThrowExceptionGivenUserIdOutOfRange");

            using (var context = new ApplicationDbContext(options))
            {
                context.Lobbies.Add(new Lobby()
                {
                    ID = 5
                });
                context.SaveChanges();
            }
            //act & assert
            using (var context = new ApplicationDbContext(options))
            {
                var service = new LobbyService(context, null, null);
                Assert.Throws <ArgumentOutOfRangeException>(() => service.AddUser(5, "unknown_user"));
            }
        }
Exemplo n.º 31
0
        void Start()
        {
            for(int i=0;i<56;i++)
            {
                loadingpercent[i]=GameObject.Find("percent"+i).GetComponent<Image>();

            }
            for(int i=0;i<10;i++)
            {
                load[i]=GameObject.Find(""+i).GetComponent<RectTransform>();
                y[i]=load [i].localPosition.y;
                up_down[i] =false ;

            }
            BeginConnectTime=Time.time;
            time=Time.time;
            guy_image=GameObject.Find ("guy").GetComponent<Image>();
            guy_rect=GameObject.Find ("guy").GetComponent<RectTransform>();

            proxy = Singletons.GET<LobbyService>();
            model = Singletons.GET<UserModel>();
            roommodel=Singletons.GET <RoomModel>();
            proxy.OnLobbyUserInfo = OnUserInfo;
            proxy.OnLobbyMyHousingItemList=OnMyHousingItemList;
            proxy.OnLobbyCharInfo=OnCharInfo;
            proxy.OnLobbyCashInfo=OnCashInfo;
            proxy.OnLobbyConnectAuth = delegate(Cmdlib.cmdGAME_ANSWER_CONNECT_AUTH data) {
                if (data.GetAck () == 1) {
                    proxy.LobbyLoginAuth (model.LALA_data.login_name, model.LALA_data.auth_key, 0, 0, 0);
                } else {

                }
            };

            proxy.OnLobbyLoginAuth = delegate(Cmdlib.cmdGAME_ANSWER_LOGIN_AUTH data) {
                if (data.GetAck () == 1) {
                    model.GALA_data=data;
                    WebLog.Log("登陆成功了!!!!");
                    proxy.LobbyUserInfo(data.security_key);
                } else {

                }
            };
            proxy.OnLobbyEnterLobby=delegate(cmdGAME_ANSWER_ENTER_LOBBY data) {
                if(data.GetAck()==1)
                {
                    WebLog.Log(data+"进入大厅");
                    //proxy.LobbyEventList();
                }
            };
            /*	proxy.OnLobbyEventList=delegate(cmdGAME_ANSWER_EVENT_LIST data) {
                roommodel.GAEL_EventList=data;
                proxy.LobbyRoomList((byte)eROOM_PAGE_TYPE.ROOM_PAGE_TYPE_NONE,(byte)eMATCH_VIEW_TYPE.MATCH_VIEW_TYPE_ITEM,(byte)eROOM_VIEW_TYPE.ROOM_VIEW_TYPE_INDIVIDUAL);
            };
            proxy.OnLobbyRoomList=delegate(cmdGAME_ANSWER_ROOM_LIST data) {
                if(data.GetAck()==1)
                {
                    WebLog.Log(data);
                //	roommodel.RoomInfo.Clear();
                }
            };
            proxy.OnLobbyNotifyRoomListPage=delegate(cmdGameNotifyRoomListPage data) {
                roommodel.GNRLG_Page=data;
                WebLog.Log(data);
            };

            proxy.OnLobbyNotifyRoomListAdd=delegate(cmdGameNotifyRoomListAdd data) {
                WebLog.Log("添加房间");
                roommodel.RoomInfo.Add(data.info);

            };*/
            lobbynetwork=Singletons.GET<LobbyNetWork>();
            lobbynetwork.Connect(1,model .LALA_data.ip,model.LALA_data.port,OnConnected);
        }
Exemplo n.º 32
0
 void Start()
 {
     roommodel=Singletons.GET<RoomModel>();
     proxy=Singletons.GET<LobbyService>();
     gameService=Singletons.GET<GameService>();
     usermodel=Singletons.GET<UserModel>();
     //	proxy.OnLobbyRoomCreate=OnRoomCreate;
     //	gameService.OnGameRoomJoin=OnGameRoomJoin;
     switch(RoomGrid.BtnModel()){
     case 0:
         model=2;
         m_IsCollider.isOn=false;
         break;
     case 1:
         model=0;
         m_IsCollider.isOn=true;
         break;
     case 2:
         model=11;
         m_IsCollider.isOn=true;
         break;
     }
 }