예제 #1
0
 // Token: 0x06000040 RID: 64 RVA: 0x00003074 File Offset: 0x00001274
 public static void Update(Graphics g)
 {
     Time.TickTime();
     if (Program.GetAsyncKeyState(Keys.Escape) != 0)
     {
         MainGame.curQuitAlpha += 0.00216666679f;
     }
     else
     {
         MainGame.curQuitAlpha -= 0.0166666675f;
     }
     MainGame.curQuitAlpha = SamMath.Clamp(MainGame.curQuitAlpha, 0f, 1f);
     if (MainGame.curQuitAlpha > 0.2f)
     {
         float num   = (MainGame.curQuitAlpha - 0.2f) / 0.8f;
         int   num2  = (int)SamMath.Lerp(-15f, 10f, Easings.ExponentialEaseOut(num * 2f));
         SizeF sizeF = g.MeasureString("Continue Holding ESC to evict goose", MainGame.showCurQuitFont, int.MaxValue);
         g.FillRectangle(Brushes.LightBlue, new Rectangle(5, num2 - 5, (int)sizeF.Width + 10, (int)sizeF.Height + 10));
         g.FillRectangle(Brushes.LightPink, new Rectangle(5, num2 - 5, (int)SamMath.Lerp(0f, sizeF.Width + 10f, num), (int)sizeF.Height + 10));
         SolidBrush solidBrush = new SolidBrush(Color.FromArgb(255, (int)(256f * MainGame.curQuitAlpha), (int)(256f * MainGame.curQuitAlpha), (int)(256f * MainGame.curQuitAlpha)));
         g.DrawString("Continue holding ESC to evict goose", MainGame.showCurQuitFont, solidBrush, 10f, (float)num2);
         solidBrush.Dispose();
     }
     if (MainGame.curQuitAlpha > 0.99f)
     {
         Application.Exit();
     }
     TheGoose.Tick();
     TheGoose.Render(g);
 }
예제 #2
0
 public static void Update(Graphics g)
 {
     Time.TickTime();
     if (Program.GetAsyncKeyState(Keys.Escape) != (short)0)
     {
         MainGame.curQuitAlpha += 0.002166667f;
     }
     else
     {
         MainGame.curQuitAlpha -= 0.01666667f;
     }
     MainGame.curQuitAlpha = SamMath.Clamp(MainGame.curQuitAlpha, 0.0f, 1f);
     if ((double)MainGame.curQuitAlpha > 0.200000002980232)
     {
         float p     = (float)(((double)MainGame.curQuitAlpha - 0.200000002980232) / 0.800000011920929);
         int   num   = (int)SamMath.Lerp(-15f, 10f, Easings.ExponentialEaseOut(p * 2f));
         SizeF sizeF = g.MeasureString("Continue Holding ESC to evict goose", MainGame.showCurQuitFont, int.MaxValue);
         g.FillRectangle(Brushes.LightBlue, new Rectangle(5, num - 5, (int)sizeF.Width + 10, (int)sizeF.Height + 10));
         g.FillRectangle(Brushes.LightPink, new Rectangle(5, num - 5, (int)SamMath.Lerp(0.0f, sizeF.Width + 10f, p), (int)sizeF.Height + 10));
         SolidBrush solidBrush = new SolidBrush(Color.FromArgb((int)byte.MaxValue, (int)(256.0 * (double)MainGame.curQuitAlpha), (int)(256.0 * (double)MainGame.curQuitAlpha), (int)(256.0 * (double)MainGame.curQuitAlpha)));
         g.DrawString("Continue holding ESC to evict goose", MainGame.showCurQuitFont, (Brush)solidBrush, 10f, (float)num);
         solidBrush.Dispose();
     }
     if ((double)MainGame.curQuitAlpha > 0.990000009536743)
     {
         Application.Exit();
     }
     TheGoose.Tick();
     TheGoose.Render(g);
 }
예제 #3
0
 public void Reshuffle()
 {
     for (int index1 = 0; index1 < this.indices.Length; ++index1)
     {
         this.indices[index1] = index1;
         int index2 = (int)SamMath.RandomRange(0.0f, (float)index1);
         int index3 = this.indices[index1];
         this.indices[index1] = this.indices[index2];
         this.indices[index2] = index3;
     }
 }