Exemple #1
0
    // Token: 0x0600240A RID: 9226 RVA: 0x0041D70C File Offset: 0x0041B90C
    public void Update()
    {
        if (!this.bColseItem)
        {
            return;
        }
        float unscaledDeltaTime = Time.unscaledDeltaTime;

        if (this.SFXKind != UIKind.None)
        {
            if (this.MP3Sound == 1)
            {
                AudioManager.Instance.PlayMP3SFX((ushort)this.SFXKind, 0f);
            }
            else
            {
                AudioManager.Instance.PlayUISFX(this.SFXKind);
            }
            this.SFXKind = UIKind.None;
        }
        if (this.ShowIconTime < 0.25f)
        {
            Vector3 localScale = this.IconTransform.localScale;
            localScale = Vector3.one * HUDMessageMgr.Quintic(this.ShowIconTime, 0f, 1f, 0.25f);
            this.IconTransform.localScale = localScale;
            this.ShowIconTime            += unscaledDeltaTime;
        }
        else
        {
            this.IconTransform.localScale = Vector3.one;
        }
        if (this.DelayTime >= 0f)
        {
            this.Alpha.alpha = 1f;
        }
        else
        {
            this.Alpha.alpha = 1f - this.DelayTime / this.FadeTime;
            if (this.Alpha.alpha <= 0.01f)
            {
                this.ThisTransform.gameObject.SetActive(false);
                if (this.Handle != null)
                {
                    this.Handle.OnDestroyMessage(this.Index);
                    this.bColseItem = false;
                }
            }
        }
        this.DelayTime -= unscaledDeltaTime;
    }
Exemple #2
0
    // Token: 0x06001175 RID: 4469 RVA: 0x001EA1A4 File Offset: 0x001E83A4
    public bool UpdateRun(float delta)
    {
        if (this.UpdateTime > 0.3f)
        {
            GUIManager.Instance.BuildingData.NotifyOpenUI(this.Index);
            this.spriteRender.color = Color.black;
            GUIManager.Instance.BuildingData.UpdateBuildState(7, 1);
            GUIManager.Instance.HideUILock(EUILock.Normal);
            return(false);
        }
        if (this.UpdateTime > 0.5f)
        {
            return(false);
        }
        float num = HUDMessageMgr.Quintic(this.UpdateTime, 0.1f, 0.2f, 0.3f);

        this.spriteRender.color = new Color(num, num, num);
        this.UpdateTime        += Time.deltaTime;
        return(true);
    }