Beispiel #1
0
        public void OnProficiencyItemClick(UIButton btn)
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            var type = btn.name;

            if (!CurType.ToString().Equals(type))
            {
                CurType = (Hotfix_LT.Data.ProficiencyType)Enum.Parse(typeof(Hotfix_LT.Data.ProficiencyType), btn.name);
                SetInfo();
                SetSelectUI();
            }
            ProficiencyDescView.ShowUI(CurUpData, NextUpData);
        }
Beispiel #2
0
        public int GetProficiencyLevelByType(Hotfix_LT.Data.ProficiencyType type)
        {
            switch (type)
            {
            case Hotfix_LT.Data.ProficiencyType.AllRound:
                return(AllRoundLevel);

            case Hotfix_LT.Data.ProficiencyType.Control:
                return(ControlLevel);

            case Hotfix_LT.Data.ProficiencyType.Strong:
                return(StrongLevel);

            case Hotfix_LT.Data.ProficiencyType.Rage:
                return(RageLevel);

            case Hotfix_LT.Data.ProficiencyType.Absorbed:
                return(AbsorbedLevel);

            default:
                return(0);
            }
        }
Beispiel #3
0
        public override void Awake()
        {
            base.Awake();
            LevelLabelList = new List <UILabel>();
            LevelLabelList.Add(mDMono.transform.GetComponent <UILabel>("1/Label"));
            LevelLabelList.Add(mDMono.transform.GetComponent <UILabel>("2/Label"));
            LevelLabelList.Add(mDMono.transform.GetComponent <UILabel>("3/Label"));
            LevelLabelList.Add(mDMono.transform.GetComponent <UILabel>("4/Label"));
            LevelLabelList.Add(mDMono.transform.GetComponent <UILabel>("5/Label"));
            SelectObjList = new List <GameObject>();
            SelectObjList.Add(mDMono.transform.Find("1/SelectBG").gameObject);
            SelectObjList.Add(mDMono.transform.Find("2/SelectBG").gameObject);
            SelectObjList.Add(mDMono.transform.Find("3/SelectBG").gameObject);
            SelectObjList.Add(mDMono.transform.Find("4/SelectBG").gameObject);
            SelectObjList.Add(mDMono.transform.Find("5/SelectBG").gameObject);
            CostObj      = mDMono.transform.Find("RequiredItems").gameObject;
            CostIconList = new List <UISprite>();
            CostIconList.Add(mDMono.transform.GetComponent <UISprite>("RequiredItems/Item1"));
            CostIconList.Add(mDMono.transform.GetComponent <UISprite>("RequiredItems/Item2"));
            CostLabelList = new List <UILabel>();
            CostLabelList.Add(mDMono.transform.GetComponent <UILabel>("RequiredItems/NumLabel1"));
            CostLabelList.Add(mDMono.transform.GetComponent <UILabel>("RequiredItems/NumLabel2"));
            ProficiencyDescView = mDMono.transform.parent.parent.GetMonoILRComponent <LTPartnerProficiencyDesc>("ProficiencyUpDesc");
            TipLabel            = mDMono.transform.GetComponent <UILabel>("RequiredItems/Tip");
            UpBtn         = mDMono.transform.GetComponent <UIButton>("ProficiencyUpBtn");
            UpSprite      = mDMono.transform.GetComponent <UISprite>("ProficiencyUpBtn/Sprite");
            TipLabel.text = string.Format("{0}:", EB.Localizer.GetString("ID_uifont_in_LTLegionManagerMenu_Label_4"));
            CurType       = Hotfix_LT.Data.ProficiencyType.Control;

            mDMono.transform.GetComponent <UIButton>("1/AllRound").onClick.Add(new EventDelegate(() => OnProficiencyItemClick(mDMono.transform.GetComponent <UIButton>("1/AllRound"))));
            mDMono.transform.GetComponent <UIButton>("2/Control").onClick.Add(new EventDelegate(() => OnProficiencyItemClick(mDMono.transform.GetComponent <UIButton>("2/Control"))));
            mDMono.transform.GetComponent <UIButton>("3/Strong").onClick.Add(new EventDelegate(() => OnProficiencyItemClick(mDMono.transform.GetComponent <UIButton>("3/Strong"))));
            mDMono.transform.GetComponent <UIButton>("4/Rage").onClick.Add(new EventDelegate(() => OnProficiencyItemClick(mDMono.transform.GetComponent <UIButton>("4/Rage"))));
            mDMono.transform.GetComponent <UIButton>("5/Absorbed").onClick.Add(new EventDelegate(() => OnProficiencyItemClick(mDMono.transform.GetComponent <UIButton>("5/Absorbed"))));

            mDMono.transform.GetComponent <ConsecutiveClickCoolTrigger>("ProficiencyUpBtn").clickEvent.Add(new EventDelegate(OnProficiencyUpBtnClick));
        }