예제 #1
0
    private void OpenUi()
    {
        if (string.IsNullOrEmpty(delayBtnName))
        {
            return;
        }
        UnityEngine.GameObject window = UIManager.Instance.GetWindowGoByName("MainCityUI");
        if (window != null)
        {
            MainCityTopTween script = window.GetComponentInChildren <MainCityTopTween>();
            if (script != null)
            {
                script.Down();
            }
        }
        switch (delayBtnName)
        {
        case "Entrance-Equipment":
            OpenAndCloseWindow("GamePokey");
            break;

        case "Entrance-Skill":
            OpenAndCloseWindow("SkillPanel");
            break;

        case "Entrance-GodEquip":
            OpenAndCloseWindow("ArtifactPanel");
            break;

        case "Entrance-Mission":
            OpenAndCloseWindow("GameTask");
            JoyStickInputProvider.JoyStickEnable = false;
            ArkCrossEngine.GfxSystem.EventChannelForLogic.Publish("ge_reload_missions", "lobby");
            break;

        //case "Entrance-Match": /*EnterInScene(2);*/
        //  //OpenAndCloseWindow("PvPEntrance");
        //  LogicSystem.SendStoryMessage("cityplayermove", 2);
        //  break;
        case "Entrance-Treasure":
            RoleInfo role_info = LobbyClient.Instance.CurrentRole;
            if (role_info != null && role_info.Level < ExpeditionPlayerInfo.c_UnlockLevel)
            {
                string chn_desc    = StrDictionaryProvider.Instance.GetDictString(456);
                string chn_confirm = StrDictionaryProvider.Instance.GetDictString(4);
                ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", chn_desc, chn_confirm, null, null, null, false);
            }
            else
            {
                OpenAndCloseWindow("cangbaotu");
            }
            break;

        case "Entrance-Mail":
            //OpenAndCloseWindow("Mail");
            break;

        case "Entrance-Friend":
            LogicSystem.PublishLogicEvent("ge_request_friends", "lobby");
            OpenAndCloseWindow("Friend");
            break;

        case "Entrance-XHun":
            OpenAndCloseWindow("XHun");
            break;

        case "Entrance-Partner":
            OpenAndCloseWindow("Partner");
            break;

        //case "Entrance-Trial":
        //  LogicSystem.SendStoryMessage("cityplayermove", 1);
        //  break;
        case "Entrance-Shop":
            OpenAndCloseWindow("Store");
            break;

        case "Entrance-Award":
            //OpenAndCloseWindow("ActivityAward");
            break;

        case "Entrance-Settings":
            break;
        }
    }
예제 #2
0
    public void OnButtonClick(UnityEngine.GameObject go)
    {
        if (go == null)
        {
            return;
        }
        delayBtnName = "";
        switch (go.name)
        {
        //case "Entrance-Equipment":
        //  OpenAndCloseWindow("GamePokey");
        //  break;
        //case "Entrance-Skill":
        //  OpenAndCloseWindow("SkillPanel");
        //  break;
        //case "Entrance-GodEquip":
        //  OpenAndCloseWindow("ArtifactPanel");
        //  break;
        //case "Entrance-Mission":
        //  OpenAndCloseWindow("GameTask");
        //  JoyStickInputProvider.JoyStickEnable = false;
        //  ArkCrossEngine.GfxSystem.EventChannelForLogic.Publish("ge_reload_missions", "lobby");
        //  if (WorldSystem.Instance.IsPureClientScene()) {
        //    CYGTConnector.HideCYGTSDK();
        //  }
        //  break;
        case "Entrance-Match":     /*EnterInScene(2);*/
                                   //OpenAndCloseWindow("PvPEntrance");
            LogicSystem.SendStoryMessage("cityplayermove", 2);
            break;

        //case "Entrance-Treasure":
        //  RoleInfo role_info = LobbyClient.Instance.CurrentRole;
        //  if (role_info != null && role_info.Level < ExpeditionPlayerInfo.c_UnlockLevel) {
        //    string chn_desc = StrDictionaryProvider.Instance.GetDictString(456);
        //    string chn_confirm = StrDictionaryProvider.Instance.GetDictString(4);
        //    ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", chn_desc, chn_confirm, null, null, null, false);
        //  } else {
        //    OpenAndCloseWindow("cangbaotu");
        //  }
        //  break;
        //case "Entrance-Mail":
        //  OpenAndCloseWindow("Mail");
        //  break;
        //case "Entrance-Friend":
        //  LogicSystem.PublishLogicEvent("ge_request_friends", "lobby");
        //  OpenAndCloseWindow("Friend");
        //  break;
        //case "Entrance-XHun":
        //  OpenAndCloseWindow("XHun");
        //  break;
        //case "Entrance-Partner":
        //  OpenAndCloseWindow("Partner");
        //  break;
        case "Entrance-Trial":
            //LogicSystem.SendStoryMessage("cityplayermove", 1);
            break;

        //case "Entrance-Shop":
        //  OpenAndCloseWindow("Store");
        //  break;
        //case "Entrance-Award":
        //  OpenAndCloseWindow("ActivityAward");
        //  break;
        default:
            delayBtnName = go.name;
            UnityEngine.GameObject window = UIManager.Instance.GetWindowGoByName("MainCityUI");
            if (window != null)
            {
                MainCityTopTween script = window.GetComponentInChildren <MainCityTopTween>();
                if (script != null)
                {
                    script.Up();
                    Invoke("OpenUi", 0.3f);
                }
                else
                {
                    OpenUi();
                }
            }
            break;
        }
    }