private void StartFadeOut()
        {
            if ((this.m_formFadeOutAnimationType != enFormFadeAnimationType.None) && !string.IsNullOrEmpty(this.m_formFadeOutAnimationName))
            {
                switch (this.m_formFadeOutAnimationType)
                {
                case enFormFadeAnimationType.Animation:
                    this.m_formFadeOutAnimationScript = base.gameObject.GetComponent <CUIAnimationScript>();
                    if (this.m_formFadeOutAnimationScript != null)
                    {
                        ((CUIAnimationScript)this.m_formFadeOutAnimationScript).PlayAnimation(this.m_formFadeOutAnimationName, true);
                        this.m_isInFadeOut = true;
                    }
                    break;

                case enFormFadeAnimationType.Animator:
                    this.m_formFadeOutAnimationScript = base.gameObject.GetComponent <CUIAnimatorScript>();
                    if (this.m_formFadeOutAnimationScript != null)
                    {
                        ((CUIAnimatorScript)this.m_formFadeOutAnimationScript).PlayAnimator(this.m_formFadeOutAnimationName);
                        this.m_isInFadeOut = true;
                    }
                    break;
                }
            }
        }
 public void AddUIComponent(CUIComponent uiComponent)
 {
     if ((uiComponent != null) && !this.m_uiComponents.Contains(uiComponent))
     {
         this.m_uiComponents.Add(uiComponent);
     }
 }
 public void RemoveUIComponent(CUIComponent uiComponent)
 {
     if (this.m_uiComponents.Contains(uiComponent))
     {
         this.m_uiComponents.Remove(uiComponent);
     }
 }
        private void StartFadeOut()
        {
            if (this.m_formFadeOutAnimationType == enFormFadeAnimationType.None || string.IsNullOrEmpty(this.m_formFadeOutAnimationName))
            {
                return;
            }
            enFormFadeAnimationType formFadeOutAnimationType = this.m_formFadeOutAnimationType;

            if (formFadeOutAnimationType != enFormFadeAnimationType.Animation)
            {
                if (formFadeOutAnimationType == enFormFadeAnimationType.Animator)
                {
                    this.m_formFadeOutAnimationScript = base.gameObject.GetComponent <CUIAnimatorScript>();
                    if (this.m_formFadeOutAnimationScript != null)
                    {
                        ((CUIAnimatorScript)this.m_formFadeOutAnimationScript).PlayAnimator(this.m_formFadeOutAnimationName);
                        this.m_isInFadeOut = true;
                    }
                }
            }
            else
            {
                this.m_formFadeOutAnimationScript = base.gameObject.GetComponent <CUIAnimationScript>();
                if (this.m_formFadeOutAnimationScript != null)
                {
                    ((CUIAnimationScript)this.m_formFadeOutAnimationScript).PlayAnimation(this.m_formFadeOutAnimationName, true);
                    this.m_isInFadeOut = true;
                }
            }
        }
Exemple #5
0
 public void Clear()
 {
     this.m_srcFormScript                = null;
     this.m_srcWidget                    = null;
     this.m_srcWidgetScript              = null;
     this.m_srcWidgetBelongedListScript  = null;
     this.m_srcWidgetIndexInBelongedList = -1;
     this.m_pointerEventData             = null;
     this.m_eventID = enUIEventID.None;
     this.m_inUse   = false;
 }