示例#1
0
 //NotifyListener
 public void onRoomCreated(RoomData eventObj)
 {
     Log("onRoomCreated " + eventObj.getId() + " " + eventObj.getRoomOwner());
     if (eventObj != null)
     {
         WarpClient.GetInstance().JoinRoom(eventObj.getId());
     }
 }
示例#2
0
 public void OnUserJoinRoom(RoomData eventObj, string _UserName)
 {
     Debug.Log("you joined room " + eventObj.getId());
     WarpClient.GetInstance().SubscribeRoom(eventObj.getId());
     if (_UserName != SC_Multyplayer_Globals.userName && isOwner)
     {
         SC_Multyplayer_Globals.Instance.MultiplayerObjects["Screen_Loading"].SetActive(false);
         WarpClient.GetInstance().startGame();
     }
 }
示例#3
0
 private void HandleOnPlayerLeftRoom(RoomData roomData, string playerID)
 {
     if (NetworkManager.Instance.joinedRoomID.Equals(roomData.getId()))
     {
         DestroyPlayer(playerID);
     }
 }
示例#4
0
    public void onUserChangeRoomProperty(RoomData roomData, string sender, Dictionary <string, System.Object> properties)
    {
        Log("Notification for User Changed Room Property received");
        Log(roomData.getId());
        Log(sender);
//		foreach (KeyValuePair<String, System.Object> entry in properties) {
//			LogMessage.Log ("KEY:" + entry.Key);
//			LogMessage.Log ("VALUE:" + entry.Value.ToString ());
//		}
    }
        public void onUserJoinedRoom(RoomData eventObj, String username)
        {
            _page.UpdateStatus(username + " joined " + eventObj.getId());
            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                _page.UnLockGameboard();
                _page.UpdateStatus("Click on any block to start Game");

            });
        }
示例#6
0
        public void CreateRoomDone(RoomData roomdata)
        {
            Room room = new Room();

            room.RoomId   = roomdata.getId();
            room.RoomName = roomdata.getName();
            room.Active   = true;
            ActiveRoom    = room;

            Console.WriteLine("Room Created, players can now join");
        }
 public void onUserChangeRoomProperty(RoomData roomData, string sender, Dictionary<String, Object> properties)
 {
     _page.showResult("Notification for User Changed Room Propert received");
     _page.showResult(roomData.getId());
     _page.showResult(sender);
     foreach (KeyValuePair<string, object> entry in properties)
     {
         _page.showResult("KEY:" + entry.Key);
         _page.showResult("VALUE:" + entry.Value.ToString());
     }
 }
示例#8
0
 public void onUserLeftRoom(RoomData eventObj, String username)
 {
     if (eventObj.getId().Equals(GlobalContext.GameRoomId))
     {
         if (!GlobalContext.localUsername.Equals(username))
         {
             Deployment.Current.Dispatcher.BeginInvoke(delegate() { App.g_QuizPageListener.OpponentLeftRoom(); });
         }
         WarpClient.GetInstance().Disconnect();
     }
 }
 public void onUserChangeRoomProperty(RoomData roomData, string sender, Dictionary <string, System.Object> properties)
 {
     Log("onUserChangeRoomProperty");
     Log(roomData.getId());
     Log(sender);
     foreach (KeyValuePair <string, System.Object> entry in properties)
     {
         Log("KEY:" + entry.Key);
         Log("VALUE:" + entry.Value.ToString());
     }
 }
示例#10
0
 public void onUserChangeRoomProperty(RoomData roomData, string sender, Dictionary <String, Object> properties)
 {
     _page.showResult("Notification for User Changed Room Propert received");
     _page.showResult(roomData.getId());
     _page.showResult(sender);
     foreach (KeyValuePair <string, object> entry in properties)
     {
         _page.showResult("KEY:" + entry.Key);
         _page.showResult("VALUE:" + entry.Value.ToString());
     }
 }
 public void onUserLeftRoom(RoomData eventObj, String username)
 {
     if (eventObj.getId().Equals(GlobalContext.GameRoomId))
     {
         if (!GlobalContext.localUsername.Equals(username))
         {
             if (OpponentLeftRoom != null)
             {
                 Deployment.Current.Dispatcher.BeginInvoke(new UserLeftRoom(OpponentLeftRoom));
             }
         }
     }
 }
 public void onSubscribeRoomDone(RoomEvent eventObj)
 {
     Debug.Log("onSubscribeRoomDone : " + eventObj.getResult());
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         GoToGameView(eventObj);
         RoomData data = eventObj.getData();
         Debug.Log("ROOMDATA: " + data.getId());
     }
     else
     {
         Debug.Log("onSubscribeRoomDone Error: " + eventObj.getData().ToString());
     }
 }
示例#13
0
            public void onUserJoinedRoom(RoomData eventObj, string username)
            {
                Debug.WriteLine("onUserJoinedRoom");

                if (eventObj != null && _page.m_username.Equals(username))
                {
                    _page.m_joinedRoomId = eventObj.getId();

                    string preGameUpdate = "{\"" + EVENT_TYPE + "\":" + PRE_GAME + ",\"" + PHASE + "\":" + ROOM_JOINED_WAITING_FOR_SERVER + "}";

                    Deployment.Current.Dispatcher.BeginInvoke(() =>
                    {
                        _page.m_d3dInterop.onChatReceived(preGameUpdate);
                    });
                }
            }
 public void onUserChangeRoomProperty(RoomData roomData, string sender, Dictionary<String, System.Object> properties)
 {
     Log("Notification for User Changed Room Property received");
     Log(roomData.getId());
     Log(sender);
     foreach (KeyValuePair<String, System.Object> entry in properties)
     {
         Log("KEY:" + entry.Key);
         Log("VALUE:" + entry.Value.ToString());
     }
 }
示例#15
0
 public void onUserJoinedRoom(RoomData eventObj, String username)
 {
     _page.showResult(username + " joined " + eventObj.getId());
 }
 public void onUserLeftRoom(RoomData eventObj, String username)
 {
     if (eventObj.getId().Equals(GlobalContext.GameRoomId))
     {
         if (!GlobalContext.localUsername.Equals(username))
         {
             if(OpponentLeftRoom!=null)
                 Deployment.Current.Dispatcher.BeginInvoke(new UICallback(OpponentLeftRoom));
         }
     }
 }
示例#17
0
 //NotifyListener
 public void onRoomCreated(RoomData eventObj)
 {
     notifications+="onRoomCreated "+eventObj.getName()+" destroyed with id "+eventObj.getId()+"\n";
     Debug.Log ("onRoomCreated");
 }
 public void onUserJoinedRoom(RoomData eventObj, String username)
 {
     _page.showResult(username + " joined " + eventObj.getId());
 }
 public void onUserLeftRoom(RoomData eventObj, String username)
 {
     if (eventObj.getId().Equals(GlobalContext.GameRoomId))
     {
         if (!GlobalContext.localUsername.Equals(username))
         {
             Deployment.Current.Dispatcher.BeginInvoke(delegate() { App.g_QuizPageListener.OpponentLeftRoom(); });
         }
         WarpClient.GetInstance().Disconnect();
     }
 }