Exemple #1
0
 /// <summary>
 /// 安全判断,确保打开充值页面时已关闭掉除商城以外的其他页面
 /// </summary>
 void SafetyCutOff()
 {
     //安全判断
     if (EZComponent.GetConment <Game_Friend>() != null)
     {
         EZComponent.RemoveConment <Game_Friend>();
     }
     if (EZComponent.GetConment <Game_Ranking>() != null)
     {
         EZComponent.RemoveConment <Game_Ranking>();
     }
     if (EZComponent.GetConment <Game_Task>() != null)
     {
         EZComponent.RemoveConment <Game_Task>();
     }
     if (EZComponent.GetConment <Game_MagicBox>() != null)
     {
         EZComponent.RemoveConment <Game_MagicBox>();
     }
     if (EZComponent.GetConment <Game_Knapsack>() != null)
     {
         EZComponent.RemoveConment <Game_Knapsack>();
     }
     if (EZComponent.GetConment <Game_Abs>() != null)
     {
         EZComponent.RemoveConment <Game_Abs>();
     }
 }
Exemple #2
0
 //显示或关闭读条界面方法,在需要场景切换时调用此方法跳转到读条界面以及切换完成时销毁此界面
 public void ShowLoadingCanvas(bool m_Show, bool m_ShowImage)
 {
     if (m_Show)
     {
         EZComponent.AddConment <UILoading>();
         EZComponent.GetConment <UILoading>().ShowImage(m_ShowImage);
     }
     else
     {
         EZComponent.RemoveConment <UILoading>();
     }
 }
Exemple #3
0
 public void ExitGameRoomMethod(Hashtable result)
 {
     if (EZComponent.GetConment <Game_Prepare>() == null)
     {
         return;
     }
     for (int i = 0; i < EZComponent.GetConment <Game_Prepare>().RoomStatus.Rooms.Length; i++)
     {
         if (EZComponent.GetConment <Game_Prepare>().RoomStatus.Rooms[i].userId == result[APIS.userId].ToString())
         {
             EZComponent.GetConment <Game_Prepare>().RoomStatus.Rooms[i].End();
         }
     }
 }
Exemple #4
0
 //增加钻石
 private void AddDiamondMethod()
 {
     SafetyCutOff();
     Debug.Log("增加钻石");
     if (EZComponent.GetConment <Game_ShopPing>() != null)
     {
         EZComponent.GetConment <Game_ShopPing>().DiamondToggle.isOn = true; //导航到金币
     }
     else
     {
         if (EZComponent.GetConment <Game_Lobby>() != null)
         {
             EZComponent.RemoveConment <Game_Lobby>();
         }
         EZComponent.AddConment <Game_ShopPing>();
         //导航到金币
         EZComponent.GetConment <Game_ShopPing>().DiamondToggle.isOn = true;
     }
 }
Exemple #5
0
        public void EnterGameRoomMethod(Hashtable result)
        {
            JsonData data = JsonMapper.ToObject(result.toJson());

            EpheMeralActor.DictUser.Clear();
            for (int i = 0; i < data[APIS.gameUsers].Count; i++)
            {
                GameUser user = new GameUser();
                user.id           = data[APIS.gameUsers][i][APIS.id].ToString();
                user.cupItemId    = data[APIS.gameUsers][i][APIS.cupItemId].ToString();
                user.diceItemId   = data[APIS.gameUsers][i][APIS.diceItemId].ToString();
                user.avatarItemId = data[APIS.gameUsers][i][APIS.avatarItemId].ToString();
                user.itemCount    = int.Parse(data[APIS.gameUsers][i][APIS.itemCount].ToString());
                user.nickName     = data[APIS.gameUsers][i][APIS.nickName].ToString();
                user.userId       = data[APIS.gameUsers][i][APIS.userId].ToString();
                EpheMeralActor.DictUser.Add(data[APIS.gameUsers][i][APIS.id].ToString(), user);
                EZComponent.GetConment <Game_Prepare>().RoomStatus.Rooms[i].mName.text = user.nickName;
                EZComponent.GetConment <Game_Prepare>().RoomStatus.Rooms[i].userId     = user.userId;
            }
        }
Exemple #6
0
 /// <summary>
 /// 创建房间
 /// </summary>
 void CreateaRoomGameMethod()
 {
     EZComponent.AddConment <Game_Prepare>();
     EZComponent.GetConment <Game_Prepare>().ContModemethod(GameModeType.CreareaRoomGame);
 }
Exemple #7
0
 /// <summary>
 /// 好友对战
 /// </summary>
 void FriendGameMethod()
 {
     EZComponent.AddConment <Game_Prepare>();
     EZComponent.GetConment <Game_Prepare>().ContModemethod(GameModeType.FriendGame);
 }
Exemple #8
0
 /// <summary>
 /// 在线匹配
 /// </summary>
 void NetWorkingGameMethod()
 {
     EZComponent.AddConment <Game_Prepare>();
     EZComponent.GetConment <Game_Prepare>().ContModemethod(GameModeType.NetWorKingGame);
 }
Exemple #9
0
 /// <summary>
 /// 单机游戏
 /// </summary>
 void SingleGameMethod()
 {
     EZComponent.AddConment <Game_Prepare>();
     EZComponent.GetConment <Game_Prepare>().ContModemethod(GameModeType.SingleGame);
 }
Exemple #10
0
 void CloseMatchingMethod()
 {
     EZComponent.AddConment <Game_UnifyUI>();
     EZComponent.GetConment <Game_UnifyUI>().UnifyUI.LoadBeOut.isOn = true;
 }
Exemple #11
0
 void OpenMethod()
 {
     //进入房间道具处理
     //EZComponent.GetConment<Game_Prepare>().request.readyItems.Add("");
     NetworkController.Instance.Send(EZComponent.GetConment <Game_Prepare>().request);
 }
Exemple #12
0
 //同步场景切换进度条数据
 public void UpdateProgressValue(int _Value)
 {
     EZComponent.GetConment <UILoading>().UpdateProgressValue(_Value);
 }
Exemple #13
0
 public void EnterRandomGameRoomResponseMethod(Hashtable result)
 {
     EZComponent.RemoveConment <Game_SelectItem>();
     EZComponent.GetConment <Game_Prepare>().ContModemethod(GameModeType.CreareaRoomGame);
 }