Exemple #1
0
        private bool UpdateTextOut()
        {
            if (!this.mFadeOut)
            {
                this.mFadeOut = true;
                this.mPastSec = 0.0f;
            }
            this.mPastSec += Time.get_deltaTime();
            bool flag = true;

            using (List <ShopTelop.TextChar> .Enumerator enumerator = this.chList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ShopTelop.TextChar current = enumerator.Current;
                    float num1 = (float)current.index * this.FadeOutInterval;
                    float num2 = num1 + this.FadeOutSec;
                    float num3 = (double)this.mPastSec > (double)num1 ? ((double)num2 <= (double)this.mPastSec || (double)this.FadeOutSec <= 0.0 ? 0.0f : (num2 - this.mPastSec) / this.FadeOutSec) : 1f;
                    current.alpha *= num3;
                    flag          &= (double)num3 <= 0.0;
                }
            }
            this.UpdateTextString();
            return(flag);
        }
Exemple #2
0
        private void UpdateTextString()
        {
            if (Object.op_Equality((Object)this.BodyText, (Object)null))
            {
                return;
            }
            Color  color = ((Graphic)this.BodyText).get_color();
            string str1  = string.Empty;

            using (List <ShopTelop.TextChar> .Enumerator enumerator = this.chList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ShopTelop.TextChar current = enumerator.Current;
                    char   ch   = current.ch;
                    byte   num  = (byte)((double)byte.MaxValue * (double)current.alpha);
                    string str2 = string.Format("<color=#{0:X2}{1:X2}{2:X2}{3:X2}>", new object[4]
                    {
                        (object)(byte)((double)byte.MaxValue * color.r),
                        (object)(byte)((double)byte.MaxValue * color.g),
                        (object)(byte)((double)byte.MaxValue * color.b),
                        (object)num
                    });
                    str1 = str1 + str2 + ch.ToString() + "</color>";
                }
            }
            this.BodyText.set_text(str1);
        }
Exemple #3
0
 private void UpdateTextAnim()
 {
     this.mPastSec += Time.get_deltaTime();
     using (List <ShopTelop.TextChar> .Enumerator enumerator = this.chList.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ShopTelop.TextChar current = enumerator.Current;
             float num1 = (float)current.index * this.FadeInInterval;
             float num2 = num1 + this.FadeInSec;
             current.alpha = (double)this.mPastSec > (double)num1 ? ((double)num2 <= (double)this.mPastSec || (double)this.FadeInSec <= 0.0 ? 1f : (this.mPastSec - num1) / this.FadeInSec) : 0.0f;
         }
     }
     this.UpdateTextString();
 }