Example #1
0
        private void SetFxObjAction(LTSpeedSnatchActiveItem item, Hotfix_LT.Data.eRoleAttr attr = Hotfix_LT.Data.eRoleAttr.None)
        {
            switch (attr)
            {
            case Hotfix_LT.Data.eRoleAttr.Feng:
            {
                item.FxFeng.CustomSetActive(true);
            }
            break;

            case Hotfix_LT.Data.eRoleAttr.Huo:
            {
                item.FxHuo.CustomSetActive(true);
            }
            break;

            case Hotfix_LT.Data.eRoleAttr.Shui:
            {
                item.FxShui.CustomSetActive(true);
            }
            break;

            default: {
                item.FxFeng.CustomSetActive(false);
                item.FxHuo.CustomSetActive(false);
                item.FxShui.CustomSetActive(false);
            } break;
            }
        }
Example #2
0
        public override void Awake()
        {
            base.Awake();

            if (!LTSpeedSnatchILRModel.GetInstance().IsActive)
            {
                mDMono.gameObject.CustomSetActive(false);
            }

            _items = new LTSpeedSnatchActiveItem[3];

            Transform itemTran = mDMono.transform.Find("Container/SnatchActiveItem1");

            _items[0] = new LTSpeedSnatchActiveItem(itemTran, mDMono.GetComponent <UIPanel>());
            itemTran  = mDMono.transform.Find("Container/SnatchActiveItem2");
            _items[1] = new LTSpeedSnatchActiveItem(itemTran, mDMono.GetComponent <UIPanel>());
            itemTran  = mDMono.transform.Find("Container/SnatchActiveItem3");
            _items[2] = new LTSpeedSnatchActiveItem(itemTran, mDMono.GetComponent <UIPanel>());

            _bxBtn    = mDMono.transform.Find("Container/BxButton").GetComponent <UIButton>();
            _infoBtn  = mDMono.transform.Find("Container/InfoButton").GetComponent <UIButton>();
            _progress = mDMono.transform.Find("Container/SnatchProgress").GetComponent <UIProgressBar>();

            _boxFx = _bxBtn.GetComponent <ParticleSystemUIComponent>();
            if (_boxFx != null)
            {
                _boxFx.panel = mDMono.GetComponent <UIPanel>();
            }

            _bxBtn.onClick.Add(new EventDelegate(OnClickBx));
            _infoBtn.onClick.Add(new EventDelegate(OnClickInfo));

            LTSpeedSnatchHotfixEvent.SpeedSnatchBase   += OnSpeedSnatchBase;
            LTSpeedSnatchHotfixEvent.SpeedSnatchActive += OnSpeedSnatchActive;
            Hotfix_LT.Messenger.AddListener("LTSpeedSnatchEvent.DropFunc", OnDropFunc);
        }