Esempio n. 1
0
 public void Draw(GLEx gl)
 {
     if (logo == null || finish)
     {
         return;
     }
     if (!logo.IsLoaded())
     {
         this.logo.LoadTexture();
     }
     if (centerX == 0 || centerY == 0)
     {
         this.centerX = (int)(LSystem.screenRect.width)
              / 2 - logo.GetWidth() / 2;
         this.centerY = (int)(LSystem.screenRect.height)
                 / 2 - logo.GetHeight() / 2;
     }
     if (logo == null || !logo.IsLoaded())
     {
         return;
     }
     alpha = (curFrame / curTime);
     if (inToOut)
     {
         curFrame++;
         if (curFrame == curTime)
         {
             alpha = 1f;
             inToOut = false;
         }
     }
     else if (!inToOut)
     {
         curFrame--;
         if (curFrame == 0)
         {
             alpha = 0f;
             finish = true;
         }
     }
     gl.Reset(true);
     gl.SetAlpha(alpha);
     gl.DrawTexture(logo, centerX, centerY);
 }