Exemple #1
0
 public void Render(Renderer renderer)
 {
     _time++;
     byte alpha = 0;
     const int scene1 = 25;
     const int scene2 = 100;
     const int scene3 = 25;
     if (_time < scene1)
     {
         alpha = (byte)(255 * _time / scene1);
     }
     else if (_time < scene1 + scene2)
     {
         alpha = 255;
     }
     else if (_time < scene1 + scene2 + scene3)
     {
         int localTime = _time - (scene1 + scene2);
         alpha = (byte)(255 - 255 * localTime / scene3);
     }
     else
     {
         Done = true;
     }
     renderer.Draw("Logo.png", new Point(), alpha);
 }
Exemple #2
0
 public void Render(Renderer renderer)
 {
     if (_length == 1)
     {
         renderer.DrawPixel(_point, _color);
         return;
     }
     renderer.DrawLine(_point, _point.Shift(0, _length), _color);
 }
Exemple #3
0
        private void RenderPreTitleLogo(Renderer renderer)
        {
            if (_time < Scene1)
            {
                return;
            }
            if (_time < Scene1 + Scene2)
            {
                if (_time == Scene1)
                    SoundManager.Play("miss.ogg");

                renderer.Draw("title1.png", new Point(0, -40));
                return;
            }
            if (_time == Scene1 + Scene2)
                SoundManager.Play("miss.ogg");

            renderer.Draw("title2.png", new Point(0, -40));
            renderer.Draw("title1.png", new Point(0, -40));
            RenderMenu(renderer);
        }
Exemple #4
0
 private void RenderMenu(Renderer renderer)
 {
     var selectionColor = new Color(0, 255, 255);
     var unselectionColor = new Color(0, 0, 255);
     var unselectableColor = new Color(25, 25, 25);
     renderer.DrawText("GAME START", new Point { X = 320, Y = 400 },
         _selection == 0 ? selectionColor : unselectionColor);
     renderer.DrawText("EXTRA GAME", new Point { X = 320, Y = 430 },
         !_enabledEx ? unselectableColor : _selection == 1 ? selectionColor : unselectionColor);
     renderer.DrawText("   EXIT   ", new Point { X = 320, Y = 460 },
         _selection == 2 ? selectionColor : unselectionColor);
 }