Ejemplo n.º 1
0
        private void Update()
        {
            switch (this._step)
            {
            case BGAniStep.Prepare:
                this._bgAniTimer += Time.deltaTime;
                if (this._bgAniTimer >= 0.1f)
                {
                    if (!this._needFade)
                    {
                        this._step = BGAniStep.None;
                        break;
                    }
                    if (_state != BGState.Fading)
                    {
                        this._bgAniTimer       = 0f;
                        this._step             = BGAniStep.FadeIn;
                        _state                 = BGState.Fading;
                        this._postImage.sprite = (this._actData == null) ? this._activityBgImgSprite : this._bgImgSprite;
                    }
                }
                break;

            case BGAniStep.FadeIn:
                this._bgAniTimer          += Time.deltaTime;
                this._preCanvasGroup.alpha = Mathf.Clamp((float)(1f - (this._bgAniTimer / 0.4f)), (float)0f, (float)1f);
                if (this._bgAniTimer >= 0.4f)
                {
                    this._step                 = BGAniStep.None;
                    _state                     = BGState.Idle;
                    this._preImage.sprite      = this._postImage.sprite;
                    this._preCanvasGroup.alpha = 1f;
                }
                if ((this._activityDatta != null) && (this._activityDatta.GetActivityType() == 3))
                {
                    this._exBGGameObject.SetActive(true);
                    this._exBGCanvasGroup.alpha = Mathf.Clamp((float)(this._bgAniTimer / 0.4f), (float)0f, (float)1f);
                    if (this._bgAniTimer >= 0.4f)
                    {
                        this._exBGCanvasGroup.alpha = 1f;
                    }
                }
                else
                {
                    this._exBGCanvasGroup.alpha = Mathf.Clamp((float)(1f - (this._bgAniTimer / 0.4f)), (float)0f, (float)1f);
                    if (this._bgAniTimer >= 0.4f)
                    {
                        this._exBGGameObject.SetActive(false);
                    }
                }
                break;
            }
        }
Ejemplo n.º 2
0
 public void SetupStatus(bool isSelect)
 {
     this._hideGameObject.SetActive(false);
     this._hideDotGameObject.SetActive(false);
     this.selected = isSelect;
     if (!isSelect)
     {
         this._selectedGameObject.SetActive(false);
         this._unselectedGameObject.SetActive(true);
         this._selectDotGameObject.SetActive(false);
         this._unselectDotGameObject.SetActive(true);
         this._imageImage.color = MiscData.GetColor("ActImageUnSelect");
         this._descTransform.SetLocalPositionX(-22f);
         this._descText.fontSize   = 0x18;
         this._descText.color      = MiscData.GetColor("ActDescGray");
         this._descOutline.enabled = false;
         this._needFade            = false;
     }
     else
     {
         this._selectedGameObject.SetActive(true);
         this._unselectedGameObject.SetActive(false);
         this._selectDotGameObject.SetActive(true);
         this._unselectDotGameObject.SetActive(false);
         this._imageImage.material = null;
         this._imageImage.color    = MiscData.GetColor("TotalWhite");
         this._descTransform.SetLocalPositionX(-42f);
         this._descText.fontSize   = 30;
         this._descText.color      = Color.white;
         this._descOutline.enabled = true;
         if (this._step != BGAniStep.FadeIn)
         {
             this._step       = BGAniStep.Prepare;
             this._bgAniTimer = 0f;
             this._needFade   = true;
         }
     }
     if ((this._actData == null) && (this._activityDatta != null))
     {
         if (this._activityDatta.GetStatus() == ActivityDataItemBase.Status.Unavailable)
         {
             this._imageImage.material = this._unselectMaterial;
             this._imageImage.color    = MiscData.GetColor("Blue");
         }
         if (isSelect)
         {
             this._infoPanel.SetupView(this._activityDatta);
         }
     }
 }
Ejemplo n.º 3
0
 private void OnDisable()
 {
     this._bgAniTimer = 0f;
     this._step       = BGAniStep.None;
     _state           = BGState.Idle;
 }