public void cardSelected()
    {
        string name;

        switch (lastCardId)
        {
        case 1008:
            name = "王语嫣";
            break;

        case 1012:
            name = "阿朱";
            break;

        case 1016:
            name = "梦姑";
            break;

        default:
            name = "阿朱";
            break;
        }
        BoxManager.showMessageByID((int)MessageIdEnum.Msg160, name);
        UIEventListener.Get(BoxManager.buttonYes).onClick += OnConfrimSelected;
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn8).ToString());
//		mainLogic.SendMessage("OnCardInfoWindow");
    }
    void QuickLogin()
    {
        Debug.Log("QuickLogin");
        //判断是第一次进入游戏的游客还是未绑定的游客
        //未绑定的游客
        string accountIdStr = "";
        //未绑定的玩家第二次登陆将提醒绑定账号
        int  loginCounts        = 0;
        long localSaveAccountID = AccountManager.GuestAccountID;

        if (AccountManager.userType == AccountManager.UserType.NotBinding)
        {
            if (PlayerPrefs.HasKey(localSaveAccountID.ToString() + "_LoginTimes"))             //本地保存登陆次数 无:首次进入游戏 1:第二次进入游戏 2:第二次以上进入游戏
            {
                loginCounts = PlayerPrefs.GetInt(localSaveAccountID.ToString() + "_LoginTimes");
//				if (AccountManager.Instance.IsInGame)
//				{
//					Debug.LogError("IS In Game");
//					PlayerPrefs.SetInt(localSaveAccountID.ToString() + "_LoginTimes",-1);
//				}
                Debug.Log("LoginCounts = " + loginCounts);
                if (!PlayerPrefs.HasKey("InGameBackLogin"))
                {
                    if (loginCounts == 1 && !isCancleBinding)
                    {
                        AccountManager.Instance.ShowAccountBindUI();
                        isCancleBinding = true;
                        return;
                    }
                }
            }
        }
        if (AccountManager.userType != AccountManager.UserType.NewUser)         //未绑定用户登陆
        {
            accountIdStr = localSaveAccountID.ToString();
        }
        if (isUnopened)
        {
            BoxManager.showMessage("服务器即将开启", ClientConfigure.title);            //WML MARK
            return;
        }
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn-1");
        //-----------------清理用户数据---------------------
        string los = PlayerPrefs.GetString("LastServer", "error");

        if (los != _selectServerAddress ||
            los == "error")
        {
            //Obj_MyselfPlayer.GetMe().ClearBattleArraySet();
            MainController.needFlashWulin = false;
        }
        NetworkSender.Instance().Login(OnGameLoginDone, accountIdStr, 1);

//		NetworkSender.Instance().CyouLogin(ProvingPasswordRet, 1, "", "", PlayerPrefs.GetString("ACCOUNT_ID"));

        //----------------添加服务器记录---------------------
        //处理存储的url丢失80端口//
        PlayerPrefs.SetString("LastServer", _selectServerAddress);
    }
 public void OnHelpWindow()    //2013-7-31 Jack Wen
 {
     //王明磊 : 统计模块代码 -> Statistics
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn43).ToString());
     //BoxManager.showMessage("¹ŠÄÜÔÝÎŽ¿ª·Å");
     ActiveWindow(ChildIndex.HelpWindowController);
 }
 public void OnCard()
 {
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn56).ToString());
     KDTLWebView.ShowWebView(DeviceHelper.GetNoticeUrl(), KDTLWebView.webViewMode.NOTICE);
     //王明磊 : 统计模块代码 -> Statistics
     //BoxManager.showMessage("功能暂未开放");
     //BoxManager.showMessageByID((int)MessageIdEnum.Msg18);
 }
 public void OnPVPWindow()
 {
     ActiveWindow(ChildIndex.PvPController);
     //王明磊 : 统计模块代码 -> Statistics
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn40).ToString());
     //BoxManager.showMessage("功能暂未开放");
     //BoxManager.showMessageByID((int)MessageIdEnum.Msg18);
 }
Esempio n. 6
0
 void OnTaskInfoWindow()
 {
     if (GuideManager.Instance.currentStep == GuideManager.GUIDE_STEP.GIFT)
     {
         GuideGift.Instance.NextStep();//奖赏引导 SELECT_1
     }
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn47).ToString());
     mainLogic.OnTaskInfoWindow();
 }
Esempio n. 7
0
 public void OnTopLeftBtn()
 {
     //王明磊 : 统计模块代码 -> Statistics
     //如果是Guide阶段,需要统计此按钮的点击信息
     if (GameManager.Instance.isGuideMode())
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn34).ToString());
     }
     GameObject.FindWithTag("main_ui_logic").GetComponent <MainUILogic>().ReturnToMainUI();
 }
 public void onUpdateWindow()
 {
     //王明磊 : 统计模块代码 -> Statistics
     //如果不是Guide阶段,需要统计此按钮的点击信息
     if (!GameManager.Instance.isGuideMode())
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn45).ToString());
     }
     mainLogic.onUpdateWindow();
 }
 public void LoadMainToPveSceneList()
 {
     //王明磊 : 统计模块代码 -> Statistics
     //如果不是Guide阶段,需要统计此按钮的点击信息
     if (!GameManager.Instance.isGuideMode())
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn39).ToString());
     }
     Obj_MyselfPlayer.GetMe().copyType = CopyType.NORMAL;
     ActiveWindow(ChildIndex.PVEMainController);
 }
Esempio n. 10
0
    public void OnTopLeftBtn()
    {
        //ÍõÃ÷ÀÚ : ͳŒÆÄ£¿éŽúÂë -> Statistics
        //Èç¹ûÊÇGuideœ×¶Î,ÐèҪͳŒÆŽË°ŽÅ¥µÄµã»÷ÐÅÏ¢

        if (GameManager.Instance.isGuideMode())
        {
            PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn28).ToString());
        }
        GameObject.FindWithTag("main_ui_logic").SendMessage("ReturnToMainUI");
    }
    public void GameRechargeUI()
    {
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn58).ToString());
//		BoxManager.showMessage("功能暂未开放");
        //BoxManager.showMessageByID((int)MessageIdEnum.Msg18);
        mainLogic.OnPurchaseWindow();
#if UNITY_ANDROID
        CYouPayManager.sendLossOrder();
#endif
    }
 public void ChangeMember()
 {
     //王明磊 : 统计模块代码 -> Statistics
     //如果是Guide阶段,需要统计此按钮的点击信息
     if (GameManager.Instance.isGuideMode())
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn14).ToString());
     }
     Obj_MyselfPlayer.GetMe().RefreshBattleArray();
     NetworkSender.Instance().sendChangeMember(ChangeMemberDone, Obj_MyselfPlayer.GetMe().teamMemberArray);
 }
 public void OnShopWindow()
 {
     mainController.SendMessage("showTopBar");        //.showTopBar();
     mainController.SendMessage("showBottomBar");     //.showBottomBar();
     //王明磊 : 统计模块代码 -> Statistics
     //如果不是Guide阶段,需要统计此按钮的点击信息
     if (!GameManager.Instance.isGuideMode())
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn41).ToString());
     }
     ActiveWindow(ChildIndex.ShopController);
 }
Esempio n. 14
0
    public static void GoRecharge(GameObject button)
    {
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn58).ToString());
//		BoxManager.showMessage("功能暂未开放");
//		BoxManager.showMessageByID((int)MessageIdEnum.Msg18);
        if (mainLogic == null)
        {
            mainLogic = GameObject.Find("MainUILogic").GetComponent <MainUILogic>();
        }
        mainLogic.OnPurchaseWindow();
    }
    void OnConfrimSelected(GameObject button)
    {
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn9).ToString());
//		OnCreateNewUser("侠客",GuideManager.Instance.selectedTempletID);
//		BoxManager.showConfirmMessage("是否需要新手引导?");

        //新版本确认必须进行新手引导
        OnCreateNewUser(GuideManager.Instance.selectedTempletID);
//		BoxManager.showMessageByID((int)MessageIdEnum.Msg68);
//		UIEventListener.Get(BoxManager.getYesButton()).onClick += StartGuide;
//      UIEventListener.Get(BoxManager.getNoButton()).onClick += SkipGuide;
    }
    //|| UNITY_STANDALONE_WIN || UNITY_IPHONE

    /*
     * void OnGUI()
     * {
     * //#if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN
     * // #if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN
     *      testIPstring =GUI.TextField(new Rect(10,10,110,30),testIPstring,15);
     *      if(GUI.Button(new Rect(130,10,60,30),"Confirm"))
     *      {
     *              if(testIPstring!="")
     *              {
     *                      serverType = -1;
     *                      SetHttpUri("http://"+testIPstring+":8080/XJGameServer/s", 0);
     *              }
     *      }
     *      if(GUI.Button(new Rect(10,110,200,60),"GM体验服"))
     *      {
     *   //HTTPClientAPI.uri = new Uri("http://124.248.36.253:8081/XJGameServer/s");
     *              SetHttpUri("http://10.6.193.106:8080/XJGameServer/s", 0);
     *              //HTTPClientAPI.uri = new Uri("http://124.248.42.21:8888/XJGameServer/s");
     *              serverType = -1;
     *  //HTTPClientAPI.uri = new Uri("http://219.232.251.92:8080/XJGameServer/s");
     *      }
     *      if(GUI.Button(new Rect(10,180,200,60),"QA_Server"))
     *      {
     *              //zhangwei's server
     *              SetHttpUri("http://10.6.153.3:8080/XJGameServer/s", 0);
     *              serverType = -1;
     *      }
     *      //
     *      if(GUI.Button(new Rect(10,250,200,60),"219.232.251.92_Server"))
     *      {
     *              SetHttpUri("http://219.232.251.92:8081/XJGameServer/s", 0);
     *              serverType = -1;
     *      }
     *      if(GUI.Button(new Rect(10,70,120,30),"Clean Account ID")){
     *              Debug.Log("Cleaned Account ID");
     *              PlayerPrefs.DeleteKey("ACCOUNT_ID");
     *              foreach (ServerDetail sd in servers)
     *              {
     *                      if (PlayerPrefs.HasKey(sd.address + "_Guest"))
     *                      {
     *                              string accountID = PlayerPrefs.GetString(sd.address + "_Guest");
     *                              if (PlayerPrefs.HasKey(accountID + "_LoginTimes"))
     *                                      PlayerPrefs.DeleteKey(accountID + "_LoginTimes");
     *                              Debug.Log("sssr Clean Account ID DeleteKey" + sd.address + "_Guest");
     *                              PlayerPrefs.DeleteKey(sd.address + "_Guest");
     *                      }
     *              }
     *              if (PlayerPrefs.HasKey("http://10.6.193.106:8080/XJGameServer/s_Guest"))
     *              {
     *                      string accountID = PlayerPrefs.GetString("http://10.6.193.106:8080/XJGameServer/s_Guest");
     *                      if (PlayerPrefs.HasKey(accountID + "_LoginTimes"))
     *                              PlayerPrefs.DeleteKey(accountID + "_LoginTimes");
     *                      PlayerPrefs.DeleteKey("http://10.6.193.106:8080/XJGameServer/s_Guest");
     *              }
     *              if (PlayerPrefs.HasKey("http://10.6.153.3:8080/XJGameServer/s_Guest"))
     *              {
     *                      string accountID = PlayerPrefs.GetString("http://10.6.153.3:8080/XJGameServer/s_Guest");
     *                      if (PlayerPrefs.HasKey(accountID + "_LoginTimes"))
     *                              PlayerPrefs.DeleteKey(accountID + "_LoginTimes");
     *                      PlayerPrefs.DeleteKey("http://10.6.153.3:8080/XJGameServer/s_Guest");
     *              }
     *
     *              for (int btnNo = 1; btnNo <= 58; btnNo++)
     *              {
     *                      string key = "Btn" + btnNo.ToString();
     *                      if (PlayerPrefs.HasKey(key)){
     *                              PlayerPrefs.DeleteKey(key);
     *                      }
     *              }
     *              if (PlayerPrefs.HasKey("LastAccountId"))
     *                      PlayerPrefs.DeleteKey("LastAccountId");
     *
     *              GuideManager.Instance.currentStep = GuideManager.GUIDE_STEP.NONE;
     *              AccountManager.ClearAllAccount();
     *      }
     *      GUI.color = Color.black;
     *      GUI.Label(new Rect(10,50,150,30),"MacAdd:"+GameManager.getMacAddress());
     * //#endif
     * }
     */
//--------------------------------选择服务器模块--------------------------------
    void serverListClicked()
    {
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn-2");
        if (ServerListWindow.activeSelf)
        {
            ServerListWindow.SetActive(false);
        }
        else
        {
            ServerListWindow.SetActive(true);
        }
    }
Esempio n. 17
0
 void onUpdateWindow()
 {
     if (!GameManager.Instance.isGuideMode())
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn45).ToString());
     }
     if (GuideManager.Instance.currentStep == GuideManager.GUIDE_STEP.UPDATE &&
         GuideUpdate.Instance.curstep == (int)GuideUpdate.GUIDE_UPDATE_STEP.NONE_1)
     {
         GuideUpdate.Instance.NextStep();//卡牌升级指引阶段 SELECT_1
     }
     mainLogic.onUpdateWindow();
 }
    public void OnRaider()
    {
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn55).ToString());

#if UNITY_IPHONE
        KDTLWebView.ShowWebView(raidrul, KDTLWebView.webViewMode.RAIDER);
#elif UNITY_ANDROID
        KDTLWebView.ShowWebView(raidrul, KDTLWebView.webViewMode.RAIDER);
#else
        mainUILogic.SendMessage("OnRaider");
#endif
    }
Esempio n. 19
0
    void OnCardStrengthenWindow()
    {
        //王明磊 : 统计模块代码 -> Statistics
        //如果不是Guide阶段,需要统计此按钮的点击信息
        if (!GameManager.Instance.isGuideMode())
        {
            PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn48).ToString());
        }
        mainLogic.OnCardStrengthenWindow();

        /*
         * if(GuideManager.Instance.currentStep == GuideManager.GUIDE_STEP.STRENGTHEN)
         *  GuideStrengthen.Instance.NextStep();//修炼指引 SELECT_1
         */
    }
    //»ØµœÖ÷œçÃæ--
    public void ReturnToMainUI()
    {
        //王明磊 : 统计模块代码 -> Statistics
        //如果不是Guide阶段,需要统计此按钮的点击信息
        if (!GameManager.Instance.isGuideMode())
        {
            PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn38).ToString());
        }
//		mainController.SendMessage("showBottomBar");
        mainController.SendMessage("showBottomBar");
        Obj_MyselfPlayer.GetMe().ResetCultivateData();
        ActiveWindow(ChildIndex.TeamController);
//        mainController.GetComponent<MainController>().ShowtopInfo();
        mainController.SendMessage("ShowtopInfo");
    }
Esempio n. 21
0
 void LoadSelectHeaderWindow()
 {
     if (GuideManager.Instance.currentStep == GuideManager.GUIDE_STEP.LEADER)
     {
         GuideLeader.Instance.NextStep();//选择队长指引阶段 SELECT_1
     }
     if (GameManager.Instance.isGuideMode())
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn11).ToString());
     }
     else
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn50).ToString());
     }
     mainLogic.LoadSelectHeaderWindow();
 }
    void CYouLogin()
    {
        Debug.Log("CyouLogin");
        if (isUnopened)
        {
            BoxManager.showMessage("服务器即将开启", ClientConfigure.title);            //WML MARK
            return;
        }
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn-1");
        //-----------------清理用户数据---------------------
        string los = PlayerPrefs.GetString("LastServer", "error");

        if (los != _selectServerAddress ||
            los == "error")
        {
            //Obj_MyselfPlayer.GetMe().ClearBattleArraySet();
            MainController.needFlashWulin = false;
        }
        //--------------------登录-------------------------
#if UNITY_ANDROID
        if (AndroidConfig.showLoginUI())
        {
            return;
        }
        string accountID = AccountManager.Instance.GetLoginAccountID();
        if (accountID == "")
        {
            accountID = "154";
        }
        NetworkSender.Instance().Login(OnGameLoginDone, accountID, 1);
#else
        if (DeviceHelper.GetChannelID() == DeviceHelper.CHANNEL_PP)
        {
            NetworkSender.Instance().Login(OnGameLoginDone, Obj_MyselfPlayer.GetMe().accountID.ToString(), 1);
        }
        else
        {
            ProvingPassword();
//			NetworkSender.Instance().Login(OnGameLoginDone, AccountManager.Instance.GetLoginAccountID(),1);
        }
#endif
        //----------------添加服务器记录---------------------
        //处理存储的url丢失80端口//
        PlayerPrefs.SetString("LastServer", _selectServerAddress);
    }
Esempio n. 23
0
 void LoadSelectMemberWindow()
 {
     if (GuideManager.Instance.currentStep == GuideManager.GUIDE_STEP.TEAM_MEMBER)
     {
         GuideMember.Instance.NextStep();//选择队员指引阶段 SELECT_1
     }
     else if (GuideManager.Instance.currentStep == GuideManager.GUIDE_STEP.TEAM_MEMBER2)
     {
         GuideMember2.Instance.NextStep();//选择队员指引阶段 SELECT_1
     }
     if (GameManager.Instance.isGuideMode())
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn13).ToString());
     }
     else
     {
         PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn51).ToString());
     }
     mainLogic.LoadSelectMemberWindow();
 }
        private void OnForwardBtn(EventDefine type, System.Object[] args)
        {
            if (GetBattleStateType() != BattleProcedureType.E_BATTLE_PROCEDURE_WAITING)
            {
                return;
            }

            if (Time.realtimeSinceStartup - m_ForwardBtnPressCounter < 3f / Time.timeScale)
            {
                return;
            }

            m_ForwardBtnPressCounter = Time.realtimeSinceStartup;

            //王明磊 : 统计模块代码 -> Statistics
            //如果是Guide阶段,需要统计此按钮的点击信息
            if (GameManager.Instance.isGuideMode())
            {
                switch (m_RoundCounter)
                {
                case 1:
                    PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn20).ToString());
                    break;

                case 2:
                    PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn21).ToString());
                    break;
                }
            }

            BattleCardManager.Instance.UpdateCardState();
            if (Obj_MyselfPlayer.GetMe().battleType == BattleType.PVE)
            {
                NetworkSender.Instance().AskBattleData(OnAskContinueBattleRet, m_RoundCounter + 1, Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID);
            }
            else if (Obj_MyselfPlayer.GetMe().battleType == BattleType.CHONG_LOU)
            {
                NetworkSender.Instance().AskChonglouBattleData(OnAskContinuePataBattleRet);
            }
        }
Esempio n. 25
0
    public void SearchFriend()
    {
        //王明磊 : 统计模块代码 -> Statistics
        PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn54).ToString());
        UIInput fID = transform.FindChild("Labels/Input-ID").GetComponent <UIInput>();

        if (fID.text == "")
        {
            //输入账号空
//			BoxManager.showMessage("请输入要查找玩家的ID");
            BoxManager.showMessageByID((int)MessageIdEnum.Msg48);
            return;
        }
        if (fID.text.Contains(":"))
        {
            NetworkSender.Instance().GMCommand(GMCommandDone, fID.text);
        }
        else if (!CompID(fID.text))
        {
//			BoxManager.showMessage("请输入正确的玩家ID");
            BoxManager.showMessageByID((int)MessageIdEnum.Msg50);
        }
        else
        {
            string ID = (int.Parse(fID.text)).ToString();   //输入的ID前面的去0处理
            if (ID == Obj_MyselfPlayer.GetMe().accountID.ToString())
            {
                //输入账号为玩家ID
                //BoxManager.showMessage("无法添加自己为好友");
                BoxManager.showMessageByID((int)MessageIdEnum.Msg49);
                return;
            }
            else
            {
                NetworkSender.Instance().SearchFriendsList(SearchFriendDone, long.Parse(ID));
            }
        }
    }
 public void OnSystemSet()
 {
     //王明磊 : 统计模块代码 -> Statistics
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn57).ToString());
     mainUILogic.SendMessage("OnSystemSet");
 }
Esempio n. 27
0
 public void hideTime()
 {
     //王明磊 : 统计模块代码 -> Statistics
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn52).ToString());
     timeInfo.SetActive(false);
 }
Esempio n. 28
0
 //Call Back
 public void friendAdd(GameObject item)
 {
     //王明磊 : 统计模块代码 -> Statistics
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn53).ToString());
     NetworkSender.Instance().ADDFriend(friendAddDone, Obj_MyselfPlayer.GetMe().friendSearchResult.guid);
 }
 public void onEvolutionWindow()
 {
     //王明磊 : 统计模块代码 -> Statistics
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn46).ToString());
     mainLogic.onEvolutionWindow();
 }
 public void OnFriendWindow()
 {
     //王明磊 : 统计模块代码 -> Statistics
     PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn42).ToString());
     NetworkSender.Instance().getFriendsList(OnFriendWindowDone);
 }