예제 #1
0
        public void OnTakeTheFieldBtnClick()
        {
            switch (partnerData.HeroInfo.role_grade)
            {
            case 1:
                FusionAudio.PostEvent("UI/New/ShangZhen", true);
                break;

            case 2:
                FusionAudio.PostEvent("UI/New/ShangZhenR", true);
                break;

            case 3:
                FusionAudio.PostEvent("UI/New/ShangZhenSR", true);
                break;

            case 4:
                FusionAudio.PostEvent("UI/New/ShangZhenSSR", true);
                break;

            case 5:
                FusionAudio.PostEvent("UI/New/ShangZhenSSR", true);
                break;
            }
            LTPartnerHandbookManager.Instance.TakeTheField(partnerData.HeroId.ToString(), (int)Conrtoller.Data.handbookId, Conrtoller.Data.index, delegate {
                Messenger.Raise(Hotfix_LT.EventName.PartnerTakeFieldEvent, new PartnerTakeFieldEvent(partnerData, Conrtoller.Data.handBookAddAttrType));
                Conrtoller.OnCancelButtonClick();
            });
        }
예제 #2
0
        private void LoadDice(object param, System.Action <int> callback)
        {
            FusionAudio.PostEvent("UI/New/Dice", true);
            string path = "_GameAssets/Res/MISC/Dice/DiceObj";
            int    num  = int.Parse(param.ToString());

            if (DiceCom != null)
            {
                InitDice(num, callback);
                return;
            }
            EB.Assets.LoadAsync(path, typeof(GameObject), o =>
            {
                if (!o)
                {
                    return;
                }

                GameObject diceObj           = GameObject.Instantiate(o) as GameObject;
                diceObj.transform.parent     = controller.transform;
                diceObj.transform.localScale = Vector3.one;
                DiceCom = diceObj.GetComponent <TouziTest>();

                if (DiceCom != null)
                {
                    InitDice(num, callback);
                    return;
                }
            });
        }
예제 #3
0
 public void OnFireTabClick()
 {
     FusionAudio.PostEvent("UI/General/ButtonClick");
     WarFiled = LegionWarField.Fire;
     FinalStatusListener(null, null);
     FinalFieldListener(null, null);
 }
예제 #4
0
        public override void OnCancelButtonClick()
        {
            if (LadderManager.Instance.IsTrusteeshiping())
            {
                FusionAudio.PostEvent("UI/General/ButtonClick");
                return;
            }
            if (_hasMatch)
            {
                FusionAudio.PostEvent("UI/General/ButtonClick");
                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_2, EB.Localizer.GetString("ID_codefont_in_LTHeroBattleMatchHudController_13754"),
                                                   (int reseult) =>
                {
                    switch (reseult)
                    {
                    case 0:
                        {
                            _hasMatch = false;
                            OnCancelMatch();
                            controller.Close();
                        }; break;

                    case 1:
                    case 2:
                        break;
                    }
                });
            }
            else
            {
                GlobalMenuManager.Instance.RemoveCache("LadderUI");
                base.OnCancelButtonClick();
            }
        }
예제 #5
0
 //交互结束处理函数
 private void OnIntactOverFunc()
 {
     if (!string.IsNullOrEmpty(mCurrentCharacterAudioName))
     {
         FusionAudio.PostCharacterAnimation(mCurrentCharacterAudioName, "Dialogue_01", false);
     }
 }
예제 #6
0
        //喝彩
        private IEnumerator DoThrowGo()
        {
            var arp = GetCurMyBetPlayer();

            if (arp != null)
            {
                var gd = LTActivityRacingManager.Instance.GetGroupData(currentGroup);
                var pd = gd.GetCurBetPlayerData();
                OnBroadCast(EB.Localizer.Format("ID_RACING_EVENT_GO", pd.Num, pd.Name));
                FusionAudio.PostEvent("SFX/Character/Common/HuoJianBaoZha");
                //表现
                var playerPos = arp.GetCurPosition();
                var spEgg     = _buttons[1].SP_EggOrGO;
                playerPos.z = -500;
                spEgg.transform.localPosition = playerPos;
                spEgg.transform.DOPunchScale(Vector3.one, 0.5f, 7, 10);

                spEgg.gameObject.CustomSetActive(true);

                yield return(new WaitForSeconds(0.5f));

                spEgg.gameObject.CustomSetActive(false);
            }

            yield break;
        }
예제 #7
0
 //技能描述
 public void RefreshSkillLabel(int skillLv)
 {
     FusionAudio.PostEvent("UI/Partner/SkillBreakUp", true);
     LevelLabel.text          = string.Format(EB.Localizer.GetString("ID_codefont_in_LTPartnerSkillBreakController_7019"), skillLv);
     CurSelectSkillLevel.text = skillLv.ToString();
     if (CurSelect == SkillType.Active)
     {
         ActiveSkillLevel.text = skillLv.ToString();
         ActiveLevelUpFx.gameObject.CustomSetActive(true);
         ActiveLevelUpFx.Play();
     }
     else if (CurSelect == SkillType.Common)
     {
         CommonSkillLevel.text = skillLv.ToString();
         CommonLevelUpFx.gameObject.CustomSetActive(true);
         CommonLevelUpFx.Play();
     }
     else if (CurSelect == SkillType.Passive)
     {
         PassiveSkillLevel.text = skillLv.ToString();
         PassiveLevelUpFx.gameObject.CustomSetActive(true);
         PassiveLevelUpFx.Play();
     }
     SetSkillDes(skillLv);
     LvUpLabelTweenTf.gameObject.CustomSetActive(true);
     UITweener[] twe = LvUpLabelTweenTf.GetComponentsInChildren <UITweener>();
     for (int i = 0; i < twe.Length; i++)
     {
         twe[i].ResetToBeginning();
         twe[i].PlayForward();
     }
 }
예제 #8
0
        public void OnIconClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            if (mItemData.Name == EB.Localizer.GetString("ID_codefont_in_NationStruct_17151"))
            {
                return;
            }
            if (mItemData.Uid == LoginManager.Instance.LocalUserId.Value)
            {
                return;
            }

            Hashtable mainData = Johny.HashtablePool.Claim();

            mainData.Add("name", mItemData.Name);
            mainData.Add("icon", mItemData.Portrait);
            mainData.Add("level", mItemData.Level);
            Hashtable data = Johny.HashtablePool.Claim();

            data.Add(SmallPartnerPacketRule.REQUEST_OTHER_PLAYER_DATA_PARAM3_TYPE0, 11111);
            Hashtable viewData = Johny.HashtablePool.Claim();

            viewData["mainData"] = mainData;
            viewData["infoType"] = eOtherPlayerInfoType.canInteraction;
            viewData[SmallPartnerPacketRule.REQUEST_OTHER_PLAYER_DATA_PARAM0] = mItemData.Uid;
            viewData[SmallPartnerPacketRule.REQUEST_OTHER_PLAYER_DATA_PARAM1] = SmallPartnerPacketRule.REQUEST_OTHER_PLAYER_DATA_PARAM1_TYPE1;
            viewData[SmallPartnerPacketRule.REQUEST_OTHER_PLAYER_DATA_PARAM2] = SmallPartnerPacketRule.REQUEST_OTHER_PLAYER_DATA_PARAM2_TYPE1;
            viewData[SmallPartnerPacketRule.REQUEST_OTHER_PLAYER_DATA_PARAM3] = data;
            GlobalMenuManager.Instance.Open("LTCheckPlayerFormationInfoUI", viewData);
        }
예제 #9
0
        public void OnEquipmentOrReplaceBtnClick()
        {
            FusionAudio.PostEvent("UI/Equipment/Equipped");

            if (LTPartnerEquipMainController.instance != null)
            {
                if (LTPartnerEquipMainController.instance.CurrentEquipmentViewState == LTPartnerEquipMainController.EquipmentViewState.PresetEditView)
                {
                    LTPartnerEquipmentInfoController.isSuitTextShow = true;
                    LTPartnerEquipmentInfoController.isChangeColor  = true;
                    LTPartnerEquipmentInfoController.isSuitTypeShow = firstController.data.SuitType;
                    LTPartnerEquipMainController.instance.AddToEquipmentInfoList((int)firstController.data.Type, firstController.data.Eid);
                    controller.Close();
                    return;
                }
            }

            LTPartnerEquipDataManager.Instance.RequireEquip(firstController.data.Eid, LTPartnerEquipMainController.CurrentPartnerData.HeroId, firstController.data.Type, delegate(bool success) {
                if (success)
                {
                    LTPartnerEquipPartnerInfoController.isSuitTextShow = true;
                    LTPartnerEquipPartnerInfoController.isChangeColor  = true;
                    LTPartnerEquipPartnerInfoController.isSuitTypeShow = firstController.data.SuitType;
                    Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerEquipChange);
                    Hotfix_LT.Messenger.Raise <int, bool>(Hotfix_LT.EventName.onPartnerCombatPowerUpdate, 3, true);
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, (firstController.ReplaceBtn.transform.GetChild(0).GetComponent <UILabel>().text == EB.Localizer.GetString("ID_EQUIP_TIPS_LOAD")) ? EB.Localizer.GetString("ID_EQUIP_DRESS_SUCCESS") : EB.Localizer.GetString("ID_EQUIP_REPLACE_SUCCESS"));
                    controller.Close();
                }
            });
        }
예제 #10
0
        IEnumerator Play()
        {
            UITweener[] ts = TopTitleLabel.transform.GetComponents <UITweener>();

            if (ts != null)
            {
                for (var i = 0; i < ts.Length; i++)
                {
                    ts[0].PlayForward();
                }
            }

            FxObj.CustomSetActive(true);

            FusionAudio.PostEvent("UI/New/JieSuo", true);
            yield return(new WaitForSeconds(ts[0].duration + ts[0].delay));

            TweenScale TS = FuncSprite.GetComponent <TweenScale>();

            //TS.ResetToBeginning();
            TS.PlayForward();

            yield return(new WaitForSeconds(TS.duration + TS.delay));

            btnClick = true;
            yield break;
        }
예제 #11
0
        public void OnSigninBack()
        {
            InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);
            FusionAudio.PostEvent("UI/General/ButtonClick");
            UpdateReceiveState(eReceiveState.have);

            if (StageDta.Type.Equals(LTShowItemType.TYPE_HERO))
            {
                LTShowItemData itemData = new LTShowItemData(StageDta.Id, StageDta.Count, StageDta.Type);
                GlobalMenuManager.Instance.Open("LTShowGetPartnerUI", itemData);
                ILRTimerManager.instance.AddTimer(100, 1, delegate { CallBack(); });
            }
            else
            {
                List <LTShowItemData> Awards = new List <LTShowItemData>()
                {
                    new LTShowItemData(StageDta.Id, StageDta.Count, StageDta.Type)
                };
                for (int i = 0; i < Awards.Count; i++)
                {
                    if (Awards[i].id == "hc")
                    {
                        FusionTelemetry.CurrencyChangeData.PostEvent(FusionTelemetry.CurrencyChangeData.hc, Awards[i].count, "签到获得");
                    }
                    if (Awards[i].id == "gold")
                    {
                        FusionTelemetry.CurrencyChangeData.PostEvent(FusionTelemetry.CurrencyChangeData.gold, Awards[i].count, "签到获得");
                    }
                }
                var ht = Johny.HashtablePool.Claim();
                ht.Add("reward", Awards);
                ht.Add("callback", new System.Action(CallBack));
                GlobalMenuManager.Instance.Open("LTShowRewardView", ht);
            }
        }
예제 #12
0
 public override IEnumerator OnAddToStack()
 {
     //SetWinnerInfo(eNationName.egypt.ToString());
     //SetLoserInfo(eNationName.roman.ToString());
     FusionAudio.PostEvent("UI/New/GongXian", true);
     return(base.OnAddToStack());
 }
예제 #13
0
        private void SetLandBGM(string landId)
        {
            switch (landId)
            {
            case "1":
                FusionAudio.PostBGMEvent("BGM/DongLuoMa", true);
                break;

            case "2":
                FusionAudio.PostBGMEvent("BGM/XiLuoMa", true);
                break;

            case "3":
                FusionAudio.PostBGMEvent("BGM/AiJi", true);
                break;

            case "4":
                FusionAudio.PostBGMEvent("BGM/BoSi", true);
                break;

            case "5":
                FusionAudio.PostBGMEvent("BGM/ManZuZhiDi", true);
                break;

            case "6":
                FusionAudio.PostBGMEvent("BGM/RenYuDao", true);
                break;
            }
            FusionAudio.StartBGM();
        }
예제 #14
0
        public override IEnumerator OnAddToStack()
        {
            FusionAudio.PostEvent("MUS/CampaignView/Demo", false);
            if (!fromDropView)
            {
                GlobalMenuManager.Instance.PushCache("LTInstanceMapHud");
            }
            ShowLand();
            challengeEntry.SetFxState(true);
            yield return(base.OnAddToStack());

            UpdateUI();
            Messenger.Raise(Hotfix_LT.EventName.FuncOpenBtnReflash);

            LTRedPointSystem.Instance.AddRedPointNodeCallBack(RedPointConst.challenge, ChallengeRP);
            LTRedPointSystem.Instance.AddRedPointNodeCallBack(RedPointConst.resourceexp, ExpRP);
            LTRedPointSystem.Instance.AddRedPointNodeCallBack(RedPointConst.resourcegold, GoldRP);
            LTRedPointSystem.Instance.AddRedPointNodeCallBack(RedPointConst.mainbox, MaxBoxRP);
            LTRedPointSystem.Instance.AddRedPointNodeCallBack(RedPointConst.alienmaze, AlienMazeRP);
            LTRedPointSystem.Instance.AddRedPointNodeCallBack(RedPointConst.awaken, AwakenRP);
            LTRedPointSystem.Instance.AddRedPointNodeCallBack(RedPointConst.climingtower, ClimingTowerRP);

            yield return(null);

            if (!mSliderBarOpened)
            {
                mSliderBarOpened = true;
                Slider.OnStateChange(mSliderBarOpened);
            }
            yield return(null);

            _isEnterStack = true;
        }
예제 #15
0
        /// <summary>
        /// 修改军团名称和图标的核心方法
        /// </summary>
        private void OnClickChangeLegionName()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            if (BtInput.value.Length <= 1)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_1, EB.Localizer.GetString("ID_codefont_in_LegionLogic_11096"));
                return;
            }
            if (iconID == data.legionIconID && BtInput.value == data.legionName)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_1, EB.Localizer.GetString("ID_codefont_in_LegionNameEditView_2604"));
                mDMono.gameObject.SetActive(false);
                return;
            }
            if (!EB.ProfanityFilter.Test(BtInput.value))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_1, EB.Localizer.GetString("ID_codefont_in_LegionLogic_10580"));
                return;
            }
            if (BalanceResourceUtil.GetUserDiamond() < AlliancesManager.Instance.Config.RenameCost)
            {
                BalanceResourceUtil.HcLessMessage();
                return;
            }

            LTHotfixApi.GetInstance().ExceptionFunc = FuncProcess;//截取异常进行处理
            EB.Sparx.Request request = LTHotfixApi.GetInstance().Post("/alliances/rename");
            request.AddData("aid", LegionModel.GetInstance().legionData.legionID);
            request.AddData("name", BtInput.value);
            request.AddData("iconID", iconID);
            LTHotfixApi.GetInstance().BlockService(request, ResProcess /* (Hashtable resData) => { }*/);//向服务器发送请求上传修改后的信息
            //AlliancesManager.Instance.Detail.IconID = iconID;//容错步骤,如果发0给服务器,服务器不会下发该数据,这里先存储,如果服务器不下发就用这里设置的,服务器下发了用服务器的
            mDMono.gameObject.SetActive(false);
        }
예제 #16
0
        public void ToVigorRestoreTimeScreen()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            Vector2 screenPos = UICamera.lastEventPosition;

            GlobalMenuManager.Instance.Open("LTVigorToolTipUI", screenPos);
        }
예제 #17
0
    protected virtual void OnAcceptButtonClick()
    {
        FusionAudio.PostEvent("UI/General/ButtonClick");

        if (acceptButton == null)
        {
            return;
        }

        if (!acceptButton.isEnabled)
        {
            return;
        }

        if (input != null)
        {
            Option.input = input.GetComponentInChildren <UIInput>().value;
        }

        if (Option.onClick != null)
        {
            Option.onClick(eUIDialogueButtons.Accept, Option);
        }

        if (Option.onClose != null)
        {
            EB.Coroutines.Run(Close(this, eUIDialogueButtons.Accept, Option));
        }
    }
예제 #18
0
        private void LoadDice(int num, System.Action <int> callback)
        {
            InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 3f);
            FusionAudio.PostEvent("UI/New/Dice", true);
            if (DiceCom != null)
            {
                InitDice(num, callback);
                return;
            }
            string path = "_GameAssets/Res/MISC/Dice/DiceObj";

            EB.Assets.LoadAsync(path, typeof(GameObject), o =>
            {
                if (!o)
                {
                    return;
                }

                GameObject diceObj           = GameObject.Instantiate(o) as GameObject;
                diceObj.transform.parent     = controller.transform;
                diceObj.transform.localScale = Vector3.one;
                DiceCom = diceObj.GetComponent <TouziTest>();

                if (DiceCom != null)
                {
                    InitDice(num, callback);
                    return;
                }
            });
        }
예제 #19
0
        public void OnChestClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            if (m_Chest.StageData.ReceiveState == eReceiveState.can)
            {
                m_Chest.UpdateReceiveState(eReceiveState.have);
                SendReceiveRewardReq(m_Chest.StageData);
                return;
            }

            string tip = "";

            if (m_Chest.StageData.ReceiveState == eReceiveState.cannot)
            {
                tip = string.Format(EB.Localizer.GetString("ID_codefont_in_TaskAchievementLogic_4553"), m_Chest.StageData.Stage);
            }
            else if (m_Chest.StageData.ReceiveState == eReceiveState.have)
            {
                tip = EB.Localizer.GetString("ID_codefont_in_LadderController_11750");
            }
            var ht = Johny.HashtablePool.Claim();

            ht.Add("data", m_Chest.StageData.Awards);
            ht.Add("tip", tip);
            GlobalMenuManager.Instance.Open("LTRewardShowUI", ht);
        }
예제 #20
0
        public void OnAddFriendClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            //int level = BalanceResourceUtil.GetUserLevel(); ;
            var func = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10057);

            if (!func.IsConditionOK())
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, func.GetConditionStr());
                return;
            }

            if (FriendManager.Instance.Info.MyFriendNum >= FriendManager.Instance.Config.MaxFriendNum)
            {
                MessageTemplateManager.ShowMessage(FriendManager.CodeFriendNumMax);
                return;
            }

            if (FriendManager.Instance.MyFriends.Find(m_Uid) != null)
            {
                MessageTemplateManager.ShowMessage(FriendManager.CodeHasFriend);
                controller.Close();
                return;
            }

            var ht = Johny.HashtablePool.Claim();

            ht.Add("uid", m_Uid);
            ht.Add("addWay", eFriendAddWay.Normal);
            GlobalMenuManager.Instance.Open("FriendApplyUI", ht);
            controller.Close();
        }
예제 #21
0
        public void OnCheckButtonClick(FinalRankCell item1, FinalRankCell item2)
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");

            if (item1.item == null ||
                item2.item == null ||
                !LTLegionWarManager.Instance.WatchLogList.CanShowFieldWatchLog(item1.item.id, item2.item.id))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_LEGION_WAR_WATCHLOG_FAIL"));
                return;
            }

            List <LegionRankData> CheckLegion = new List <LegionRankData>();

            if (item1.mDMono.transform.name.Equals("0"))
            {
                LTLegionWarManager.Instance.SemiFinalField = 0;
            }
            else if (item1.mDMono.transform.name == "2")
            {
                LTLegionWarManager.Instance.SemiFinalField = 1;
            }
            else
            {
                LTLegionWarManager.Instance.SemiFinalField = -1;
            }

            CheckLegion.Add(item1.item);
            CheckLegion.Add(item2.item);

            GlobalMenuManager.Instance.Open("LTLegionWarFinalView", CheckLegion);
        }
예제 #22
0
        public void OnChatClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            var func = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10057);

            if (!func.IsConditionOK())
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, func.GetConditionStr());
                return;
            }

            if (!FriendHudController.sOpen)
            {
                var ht = Johny.HashtablePool.Claim();
                ht.Add("type", eFriendType.Recently);
                ht.Add("uid", m_Uid);
                GlobalMenuManager.Instance.Open("FriendHud", ht);
            }
            else
            {
                Messenger.Raise(Hotfix_LT.EventName.FriendOpenRecentlyEvent, m_Uid);
            }

            controller.Close();
        }
예제 #23
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            m_Container         = t.FindEx("Container").gameObject;
            m_WorldName_Label   = t.GetComponent <UILabel>("Container/UIPanel/Tween/ServerBar/BG/WName");
            VersionLabel        = t.GetComponent <UILabel>("Container/UIPanel/Tween/DistributeAnchor/Layout/FullVersion");
            TweenParent         = t.GetComponent <TweenAlpha>("Container/UIPanel/Tween");
            m_ResetGameBtnPanel = t.FindEx("Container/UIPanel/Tween/ResetGameButtonPanel").gameObject;

            controller.hudRoot = t.GetComponent <Transform>();

            t.GetComponent <UIButton>("Container/UIPanel/Tween/ServerBar/BG").onClick.Add(new EventDelegate(OnSelectWorldBtnClick));
            t.GetComponent <UIButton>("Container/UIPanel/Tween/EnterGameButtonPanel/Button").onClick.Add(new EventDelegate(OnEnterGameBtnClick));
            t.GetComponent <UIButton>("Container/UIPanel/Tween/ResetGameButtonPanel/Button").onClick.Add(new EventDelegate(OnResetGameBtnClick));
            t.GetComponent <UIButton>("Container/UIPanel/Tween/NoticeBtn").onClick.Add(new EventDelegate(OnNoticeBtnClick));
            t.GetComponent <UIButton>("Container/UIPanel/Tween/OfficialWebBtn").onClick.Add(new EventDelegate(OnOfficialWebBtnClick));

            if (ILRDefine.DEBUG || ILRDefine.USE_GM)
            {
                m_ResetGameBtnPanel.gameObject.CustomSetActive(true);
            }
            else
            {
                m_ResetGameBtnPanel.gameObject.CustomSetActive(false);
            }
            FusionAudio.PostGlobalMusicEvent("MUS_CampaignView_Demo", true);
        }
예제 #24
0
        public void OnPKClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            string Name = NameLabel.text;

            OtherPlayerInfoController.PK(m_Uid);
            //OtherPlayerInfoController.PK(m_Uid, Name, delegate (EB.Sparx.Response result)
            //{
            //    if (result.sucessful)
            //    {
            //        if (result.hashtable != null)  //902069:对方正忙或已离线!
            //        {
            //            int errCode = EB.Dot.Integer("errCode", result.hashtable, -1);
            //            switch ((PkErrCode)errCode)
            //            {
            //                case PkErrCode.Busying:
            //                    MessageTemplateManager.ShowMessage(902069);
            //                    return;
            //                case PkErrCode.NotReceivePkRequest:
            //                    MessageTemplateManager.ShowMessage(902069);
            //                    return;
            //                default:
            //                    var ht = Johny.HashtablePool.Claim();
            //                    ht.Add("name", Name);
            //                    ht.Add("uid", m_Uid );
            //                    GlobalMenuManager.Instance.Open("PkSendRequestUI", ht);
            //                    break;
            //            }
            //        }
            //    }
            //});
        }
예제 #25
0
 public void OnThemeBtnClick()
 {
     FusionAudio.PostEvent("UI/General/ButtonClick", true);
     ThemeTipObj.CustomSetActive(true);
     ThemeTipObj.GetComponent <TweenScale>().ResetToBeginning();
     ThemeTipObj.GetComponent <TweenScale>().PlayForward();
 }
예제 #26
0
        public void OnBattleBtnClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");

            if (AllianceUtil.GetIsInTransferDart(null))
            {
                return;
            }

            if (BalanceResourceUtil.EnterVigorCheck(NewGameConfigTemplateManager.Instance.GetResourceBattleEnterVigor(mInstanceType)))
            {
                return;
            }

            if (mLeftTimes <= 0)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_6819"));
            }
            else if (!LTResourceInstanceManager.Instance.IsLevelEnough(mChooseLevel))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_7027"), mChooseLevel.level));
            }
            else if (LTResourceInstanceManager.Instance.IsLock(mChooseLevel, mInstanceType))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_7254"));
            }
            else
            {
                BattleReadyHudController.Open(mActivityTbl.battle_type, StartBattleRequest, mChooseLevel.layout);
            }
        }
예제 #27
0
        public void OnRuleBtnClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            string rule = EB.Localizer.GetString("ID_RULE_ALLIANCEWAR");

            GlobalMenuManager.Instance.Open("LTRuleUIView", rule);
        }
예제 #28
0
        public void OnBuyTimesButtonClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            int buyCost = HonorArenaManager.Instance.Info.quantity;

            //购买花费
            if (BalanceResourceUtil.GetUserDiamond() < buyCost)
            {
                BalanceResourceUtil.HcLessMessage();
                return;
            }

            var ht = Johny.HashtablePool.Claim();

            ht.Add("0", buyCost);
            MessageTemplateManager.ShowMessage(902123, ht, delegate(int result)
            {
                if (result == 0)
                {
                    HonorArenaManager.Instance.BuyChallengeTimes(delegate(bool successful)
                    {
                        StoneLabel.text = string.Format("{0}", HonorArenaManager.Instance.Info.ticket);
                    });
                }
            });
            Johny.HashtablePool.Release(ht);
        }
예제 #29
0
        public void OnLeaveBtnClick()
        {
            if (mIsBoss)
            {
                LTInstanceMapModel.Instance.RequestChallengeFinshChapter(0, LTInstanceMapModel.Instance.CurLevelNum, delegate
                {
                    FusionAudio.PostEvent("UI/Floor/Transfer");
                    OnCancelButtonClick();
                });
                return;
            }

            MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_2, EB.Localizer.GetString("ID_codefont_in_LTChallengeInstancePortalCtrl_1452"), (int result) =>
            {
                switch (result)
                {
                case 0:
                    LTInstanceMapModel.Instance.RequestChallengeFinshChapter(0, LTInstanceMapModel.Instance.CurLevelNum, delegate
                    {
                        FusionAudio.PostEvent("UI/Floor/Transfer");
                        OnCancelButtonClick();
                    });
                    break;

                case 1:
                case 2:
                    break;
                }
            });
        }
예제 #30
0
        public override IEnumerator OnAddToStack()
        {
            yield return(base.OnAddToStack());

            isOver = false;

            com.IsWon = isWon;
            if (isWon)
            {
                FusionAudio.PostEvent("MUS/CombatView/Stinger/Victory", controller.gameObject, true);
            }
            else
            {
                FusionAudio.PostEvent("MUS/CombatView/Stinger/Defeat", controller.gameObject, true);
            }
            com.IsShowHp     = true;
            com.IsShowTempHp = isConfirm;
            com.mDMono.gameObject.CustomSetActive(true);
            com.onShownAnimCompleted = () =>
            {
                Tip.CustomSetActive(!isConfirm);
                TryBtn.CustomSetActive(isConfirm);
                ConfirmBtn.CustomSetActive(isConfirm);
            };
        }