Пример #1
0
 public override void Init <T>(string name, UIInfo info, T arg)
 {
     base.Init(name, info, arg);
     m_OkBtn.button.onClick.AddListener(OnOkBtnClick);
     lvUpBtn.onClick.AddListener(OnLvUpBtnClick);
     lvUpMaxBtn.onClick.AddListener(OnLvUpMaxBtnClick);
     //InitWeaponDropDown();
     m_CanvasRect = GetComponentInParent <Canvas>().rectTransform();
 }
Пример #2
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            gunCardRes = arg as GunCard_TableItem;
            if (gunCardRes != null)
            {
                ShowCardInfo();
            }
        }
Пример #3
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            InitCoinInfo();
            Btn1.button.onClick.AddListener(OnClickOpen);
            Btn2.button.onClick.AddListener(OnClickAdOpen);

            base.ChangeLanguage();
        }
Пример #4
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            m_ItemDTO = arg as ItemDTO;
            ConsumeValue.text.text   = "×" + UiTools.FormateMoneyUP(m_ItemDTO.num);
            ConsumeIcon.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(string.Format(CommonResourceConstVal.RESOURCE_PATH, m_ItemDTO.itemId));
            box_open.gameObject.SetActive(false);
            box_close.gameObject.SetActive(true);
            ItemItem itemCfg = Global.gApp.gGameData.ItemData.Get(m_ItemDTO.itemId);

            if (itemCfg != null)
            {
                if (itemCfg.openBoxImg != null && itemCfg.openBoxImg != string.Empty)
                {
                    box_open.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(itemCfg.openBoxImg);
                }
                if (itemCfg.closeBoxImg != null && itemCfg.closeBoxImg != string.Empty)
                {
                    box_close.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(itemCfg.closeBoxImg);
                }
            }

            m_UI_openbox_white.gameObject.SetActive(m_ItemDTO.itemId == SpecialItemIdConstVal.ENERGY);
            m_UI_openbox_purple.gameObject.SetActive(m_ItemDTO.itemId == SpecialItemIdConstVal.MDT);
            m_UI_openbox.gameObject.SetActive(m_ItemDTO.itemId != SpecialItemIdConstVal.ENERGY && m_ItemDTO.itemId != SpecialItemIdConstVal.MDT);

            bool haveThree = itemCfg.id == SpecialItemIdConstVal.GOLD;

            Btn1.gameObject.SetActive(haveThree);
            Btn2.gameObject.SetActive(haveThree);
            if (haveThree)
            {
                Btn1.button.onClick.AddListener(OnClick1);
                Btn2.button.onClick.AddListener(OnClick3);
                CmNum.text.text   = UiTools.FormateMoney(m_ItemDTO.num);
                CmNumAd.text.text = UiTools.FormateMoney(m_ItemDTO.num * m_ADTimes);
            }
            else
            {
                gameObject.AddComponent <DelayCallBack>().SetAction(() =>
                {
                    if (m_ItemDTO.param3 > 0)
                    {
                        Global.gApp.gSystemMgr.GetQuestMgr().ReceiveQuest((int)m_ItemDTO.param3, 1, BehaviorTypeConstVal.OPT_LEVEL_DETAIL);
                    }

                    OnOpen();
                }, 0.8f, true);
            }


            RegisterListeners();
            base.ChangeLanguage();
        }
Пример #5
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            InitNode();
            RegisterListeners();

            MainTxtBtn.button.onClick.AddListener(OnMain);
            SubTxtBtn.button.onClick.AddListener(OnSub);

            base.ChangeLanguage();
        }
Пример #6
0
        // todo  增加 奖励 领取状态。此时身上无任务。
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            m_FollowRectTsf = m_TaskAdaptNode.gameObject.GetComponent <RectTransform>();
            Canvas parentCanvas = GetComponentInParent <Canvas>();

            m_ParentRectTsf = parentCanvas.GetComponent <RectTransform>();

            gameObject.AddComponent <DelayCallBack>().SetAction(TouchClose, 5);
            base.ChangeLanguage();
        }
Пример #7
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);


            levelRes = arg as Level_TableItem;
            if (levelRes != null)
            {
                ShowStars();
            }
        }
Пример #8
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            InitNode();
            Global.gApp.gSystemMgr.GetNpcMgr().FreshCampInfo();

            ChangeLanguage();
            gameObject.AddComponent <DelayCallBack>().SetAction(() => {
                Global.gApp.gSystemMgr.GetPassMgr().ShowTankUiState();
            }, 1.5f, false);
            m_FreshPet = true;
        }
Пример #9
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            m_NpcBehavior = arg as NpcBehavior;
            Canvas        parentCanvas  = GetComponentInParent <Canvas>();
            RectTransform parentRectTsf = parentCanvas.GetComponent <RectTransform>();

            m_AdaptNode.rectTransform.anchoredPosition = UiTools.WorldToRectPos(gameObject, m_NpcBehavior.GetTaskUINode().position, parentRectTsf);
            GenerateRecycleMat();
            InitNode();
            base.ChangeLanguage();
        }
Пример #10
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            NormalBtn.button.onClick.AddListener(OnNormal);
            AdBtn.button.onClick.AddListener(WatchADs);
            Btn1.button.onClick.AddListener(TouchClose);
            RegisterListeners();
            FreshWeek();

            base.ChangeLanguage();
        }
Пример #11
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            InitNode();
            RegisterListeners();

            GetMDTBtn.button.onClick.AddListener(OnADGetMDTBtn);
            CloseBtn.button.onClick.AddListener(OnCloseBtn);
            Ad4Mdt.button.onClick.AddListener(OnADGetMDTBtn);

            base.ChangeLanguage();
        }
Пример #12
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            m_OrderLayer = info.Order;

            OnCommonIndexChange(m_CurPannelIndex);

            shop.shop.Lockimg.gameObject.SetActive(!PlayerDataMgr.singleton.ModuleIsOpen(GameModuleType.ShopTab));
            weapon.weapon.Lockimg.gameObject.SetActive(!PlayerDataMgr.singleton.ModuleIsOpen(GameModuleType.GunTab));
            RegisterListeners();
        }
Пример #13
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            ShowCardChip();

            passProgress.image.fillAmount = 0;
            ChipCount.text.text           = string.Format("{0}/{1}", 0, 100);

            ExchangeBtn.gameObject.SetActive(false);
            GotoBtn.gameObject.SetActive(true);
        }
Пример #14
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            DiamondChanged(PlayerDataMgr.singleton.Diamond);
            GoldChanged(PlayerDataMgr.singleton.Gold);
            CampRewardChanged(CampsiteMgr.singleton.TotalRewardVal);
            RefreshCampRate();
            RegisterListeners();
            RefreshGoldAddBtnActive();
            RefreshDiamondAddBtnActive();
        }
Пример #15
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            taskInfo = arg as TaskInfo;
            if (taskInfo == null)
            {
                return;
            }

            ShowTask();
        }
Пример #16
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            ShowGunCard();

            bool fuseOpen = PlayerDataMgr.singleton.ModuleIsOpen(GameModuleType.GunFuse);

            SubGunLockImg1.gameObject.SetActive(!fuseOpen);
            SubGunLockImg2.gameObject.SetActive(!fuseOpen);
            SubGunLockImg3.gameObject.SetActive(!fuseOpen);
            SubGunLockImg4.gameObject.SetActive(!fuseOpen);
        }
Пример #17
0
 public override void Init <T>(string name, UIInfo info, T arg)
 {
     base.Init(name, info, arg);
     if (groupArr != null)
     {
         for (int i = 0; i < groupArr.Length; i++)
         {
             groupArr[i].Init();
         }
     }
     FocusGroup(arg as string);
     RegisterListeners();
 }
Пример #18
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            CommonUI commonui = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel);

            if (commonui != null)
            {
                commonui.SetOrderLayer(30);
            }
            OnExChangeMat();
            UIFresh();
            base.ChangeLanguage();
        }
Пример #19
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            m_Type = arg as string;
            UIFresh();

            RegisterListeners();

            base.ChangeLanguage();

            Btn1.button.onClick.AddListener(OnClose);
            Btn2.button.onClick.AddListener(OnRetry);
        }
Пример #20
0
        //private SdkdsPurchaseUtils.Product m_Product;
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            Btn2.button.onClick.AddListener(OnGoTo);
            BtnC.button.onClick.AddListener(OnCloseBtn);
            RegisterListeners();
            base.ChangeLanguage();

            m_IdStr = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.TIME_GIFT2_PRODUCT).content;
            string[] prms    = m_IdStr.Split('.');
            ItemItem itemCfg = Global.gApp.gGameData.ItemData.Get(int.Parse(prms[2]));

            m_RemainStr = Global.gApp.gGameData.GetTipsInCurLanguage(4186);

            double        mills = DateTimeUtil.m_Day_Mills * 7 - DateTimeUtil.GetMills(DateTime.Now) + Global.gApp.gSystemMgr.GetMiscMgr().TimeGiftStartTime;
            DelayCallBack dcb   = gameObject.AddComponent <DelayCallBack>();

            if (mills < 0d)
            {
                mills = 0d;
            }
            TimeCount.text.text = string.Format(m_RemainStr, Global.gApp.gGameData.GetTimeInCurLanguage(mills));
            dcb.SetAction(() =>
            {
                double ms = DateTimeUtil.m_Day_Mills * 7 - DateTimeUtil.GetMills(DateTime.Now) + Global.gApp.gSystemMgr.GetMiscMgr().TimeGiftStartTime;
                if (ms < 0d)
                {
                    ms = 0d;
                }
                TimeCount.text.text = string.Format(m_RemainStr, Global.gApp.gGameData.GetTimeInCurLanguage(ms));
            }, 1f);

            dcb.SetCallTimes(Convert.ToInt32(mills / DateTimeUtil.m_Sec_Mills) + 1);

#if (UNITY_EDITOR || DISBLE_PLATFORM)
#else
            //if (SdkdsPurchaseUtils.m_ProductList!= null && SdkdsPurchaseUtils.m_ProductList.Count > 0)
            //{
            //    foreach (SdkdsPurchaseUtils.Product product in SdkdsPurchaseUtils.m_ProductList) {
            //        if (SdkdsPurchaseUtils.IsSpecialPruchase(product, GeneralConfigConstVal.TIME_GIFT2_PRODUCT))
            //        {
            //            m_Product = product;
            //            break;
            //        }
            //    }

            //    moneyNum.text.text = m_Product.price;
            //}
#endif
        }
Пример #21
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            RegisterListeners();
            ShopUI_ShopItemUI scrShopItem = arg as ShopUI_ShopItemUI;

            m_ShopId   = scrShopItem.GetId();
            mEffectNum = scrShopItem.effct_num;
            m_ItemNum  = scrShopItem.GetItemNum();
            mFxPos     = scrShopItem.gameObject.transform.position;
            InitNode();

            base.ChangeLanguage();
        }
Пример #22
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            m_RemainFrames    = Application.targetFrameRate * 6;
            Btn1txt.text.text = "×" + TableMgr.singleton.ValueTable.battle_revive_cost;

            Btn1.button.onClick.AddListener(OnClicRevive);
            ADBtn.button.onClick.AddListener(OnAdBtn);
            CloseBtn.button.onClick.AddListener(OnGiveUpBtnClick);
            RegisterListeners();

            base.ChangeLanguage();
        }
Пример #23
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            FlushPanelInfo();

            Btn1.button.onClick.AddListener(OnclickMultAward);
            Btn2.button.onClick.AddListener(OnClickConfirm);
            Btn2.gameObject.SetActive(false);

            float delaySec = float.Parse(Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.FIGHT_RESULT_BTN_DELAY_SEC).content);

            gameObject.AddComponent <DelayCallBack>().SetAction(() => { Btn2.gameObject.SetActive(true); }, delaySec, true);
            waitAdTxt.gameObject.SetActive(false);
            base.ChangeLanguage();
        }
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            RegisterListeners();

            m_Pass = arg as PassItem;

            GeneralConfigItem initPassIdConfig = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.INIT_PASS_ID);

            confirmtxt.text.text = string.Format(Global.gApp.gGameData.GetTipsInCurLanguage(4260), m_Pass.id % Convert.ToInt32(initPassIdConfig.content));

            Btn1.button.onClick.AddListener(TouchClose);
            Btn2.button.onClick.AddListener(OnStartGame);

            base.ChangeLanguage();
        }
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            m_MatItemUI       = arg as CampMatBag_MatItemUI;
            m_CampRecycleItem = m_MatItemUI.GetRecycleItem();;
            Gold_paramsItem gpiCfg = Global.gApp.gGameData.GoldParamsConfig.Get(Global.gApp.gSystemMgr.GetBaseAttrMgr().GetLevel());

            m_GoldParam = gpiCfg.coinParams;

            double count = GameItemFactory.GetInstance().GetItem(m_CampRecycleItem.id);

            m_RealMaxCount = count;
            m_MaxCount     = (double)((int)(m_RealMaxCount + 0.5d));
            m_CurSellCount = m_MaxCount;
            InitNode();
            base.ChangeLanguage();
        }
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            ClaimBtn.button.onClick.AddListener(OnClaimBtnClick);
            double dt; double reward;

            if (CampsiteMgr.singleton.CheckOfflineReward(out dt, out reward))
            {
                RewardValTxt.text.text = UiTools.FormateMoney(reward);
                TimeSpan ts = new TimeSpan((long)(10000000 * dt));
                OfflineTimeTxt.text.text      = string.Format("{0:00}:{1:00}:{2:00}", (int)ts.TotalHours, ts.Minutes, ts.Seconds);
                OfflineTimeBar.slider.value   = Mathf.Clamp01((float)(dt / (CampsiteMgr.singleton.GetMaxOfflineHour() * 60 * 60)));
                MinHourTxt.text.text          = "0";
                MaxHourTxt.text.text          = LanguageMgr.GetText("IdelPage_Text_MaxTime", CampsiteMgr.singleton.GetMaxOfflineHour());
                MaxDurationDocTxt.text.text   = LanguageMgr.GetText("IdelPage_Text_Tips", CampsiteMgr.OFFLINE_HOUR_EACH_CARD);
                CollectCardCountTxt.text.text = LanguageMgr.GetText("IdelPage_Text_Number", PlayerDataMgr.singleton.GetCollectCardCount());
            }
        }
Пример #27
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            //string idStr = arg as string;
            //if (!UiTools.IsNumeric(idStr))
            //{
            //    Debug.LogErrorFormat("对话id非法 = {0}", idStr);
            //    TouchClose();
            //    return;
            //}
            //campID = int.Parse(idStr);

            //var campRes = TableMgr.singleton.CampSetTable.GetItemByID(campID);
            //if (campRes == null)
            //    return;

            //TitleText.text.text = LanguageMgr.GetText("CampChapter", campID);
            //NameText.text.text = LanguageMgr.GetText(campRes.tid_name);
        }
Пример #28
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            Pause();
            base.Init(name, info, arg);
            FlushSoundState();

            Btn1.button.onClick.AddListener(OnClickQuit);
            Btn2.button.onClick.AddListener(TouchClose);
            BtnC.button.onClick.AddListener(TouchClose);

            BtnmusicOff.button.onClick.AddListener(OnClickMusicOff);
            BtnmusicOn.button.onClick.AddListener(OnClickMusicOn);
            BtnvolOff.button.onClick.AddListener(OnClickAudioOff);
            BtnvolOn.button.onClick.AddListener(OnClickAudioOn);
            BtnVibeOff.button.onClick.AddListener(OnClickVibeOff);
            BtnVibeOn.button.onClick.AddListener(OnClickVibeOn);

            base.ChangeLanguage();
        }
Пример #29
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            skillInfo = arg as SkillInfo;
            if (skillInfo == null)
            {
                return;
            }

            if (skillInfo.type == SkillType.Fuse)
            {
                InitFuseSkill(skillInfo.skillID);
            }
            else if (skillInfo.type == SkillType.Camp)
            {
                InitCampSkill(skillInfo.skillID);
            }
        }
Пример #30
0
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);

            GeneralConfigItem cfg = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.LANGUAGE_LIST);

            BtnLanguage.gameObject.SetActive(false);
            for (int i = 0; i < cfg.contents.Length; i += 3)
            {
                LanguageConfigUI_BtnLanguage bl = BtnLanguage.GetInstance();
                bl.Init(cfg.contents[i + 1], cfg.contents[i], this);
                bl.transform.SetSiblingIndex(i);
                m_list.Add(bl);
            }

            BtnC.button.onClick.AddListener(TouchClose);

            RegisterListeners();
            ChangeLanguage();
        }