Example #1
0
        public override bool Init(IUIWnd wnd)
        {
            if (DefaultComponent_Type0 != null)
            {
                DefaultComponent_Type0.gameObject.SetActive(false);
            }
            if (DefaultComponent_Type1 != null)
            {
                DefaultComponent_Type1.gameObject.SetActive(false);
            }
            DefaultComponent = DefaultComponent_Type0;

            if (AutoRemoveComponent != null)
            {
                AutoRemoveComponent.gameObject.SetActive(false);
            }
            if (AlwaysDisplayComponent != null)
            {
                AlwaysDisplayComponent.gameObject.SetActive(false);
            }

            if (RewardComponent != null)
            {
                RewardComponent.gameObject.SetActive(false);
            }

            m_listUsingComponent       = new List <UGuideNodeDisplayComponent>();
            m_listUsingRewardComponent = new List <UGuideNodeRewardComponent>();
            m_dicGuideEffect           = new List <UEffectParamBase>();


            m_defaultCustomUserData = new UGuideMsgData.CustomUserData(0f, 250f, 0);
            //ModalColor = new Color(0, 0, 0, 233f / 255f);
            return(base.Init(wnd));
        }
Example #2
0
        protected void SetUserData(UGuideMsgData.CustomUserData _userData, ref UGuideNodeDisplayComponent _targetComponent)
        {
            UGuideMsgData.CustomUserData tmpUserData = _userData == null ? m_defaultCustomUserData : _userData;

            if (tmpUserData.CustomXPos != null)
            {
                Vector2 newPos = DefaultComponent.GetRectTransform.anchoredPosition;
                newPos.x = (float)tmpUserData.CustomXPos;
                DefaultComponent.GetRectTransform.anchoredPosition = newPos;
            }
            if (tmpUserData.CustomYPos != null)
            {
                Vector2 newPos = DefaultComponent.GetRectTransform.anchoredPosition;
                newPos.y = (float)tmpUserData.CustomYPos;
                DefaultComponent.GetRectTransform.anchoredPosition = newPos;
            }
        }
Example #3
0
        /// <summary>
        /// 更新当前主引导对象
        /// </summary>
        /// <param name="_userData"></param>
        protected void SetUserDataDefaultComponent(UGuideMsgData.CustomUserData _userData)
        {
            UGuideMsgData.CustomUserData tmpUserData = _userData == null ? m_defaultCustomUserData : _userData;

            if (tmpUserData.CustomType != null)
            {
                if (tmpUserData.CustomType == 1)
                {
                    if (DefaultComponent != DefaultComponent_Type1)
                    {
                        Hide();
                        DefaultComponent = DefaultComponent_Type1;
                    }
                }
                else
                {
                    if (DefaultComponent != DefaultComponent_Type0)
                    {
                        Hide();
                        DefaultComponent = DefaultComponent_Type0;
                    }
                }
            }
        }