Beispiel #1
0
 public ShootingGameView(ShootingGame game)
 {
     _game = game;
 }
Beispiel #2
0
        private bool DoTitle()
        {
            Input input = _input.GetInput();
            _title.Render(input);
            _renderer.Flip();
            if (_title.Start)
            {
                _game = new ShootingGame(_title.IsEx);
                _view = new ShootingGameView(_game)
                {
                    Renderer = _renderer,
                    SoundManager = _soundManager
                };
                _current = DoGame;
                _title = new Title
                {
                    Renderer = _renderer,
                    SoundManager = _soundManager
                };

                return true;
            }
            if (_title.Edit)
            {
                _current = DoEditor;
                return true;
            }
            return !_title.Exit;
        }
Beispiel #3
0
 private void RenderUi(ShootingGame game)
 {
     Renderer.DrawText("SCARLEX   ", new Point(553, 20), new Color(255, 0, 0));
     Renderer.DrawText("       '13", new Point(553, 20), new Color(0, 160, 0));
     Renderer.DrawText("TIME",
         new Point(613, 80), new Color(255, 0, 0));
     Renderer.DrawText(game.Time.ToString("mm\\'ss\\\"ff"),
         new Point(573, 120), new Color(255, 255, 255));
     Renderer.DrawText("SCORE",
         new Point(603, 180), new Color(255, 0, 0));
     Renderer.DrawText(game.Score.ToString("000000"),
         new Point(593, 220), new Color(255, 255, 255));
     Renderer.DrawText("LEVEL", new Point(603, 280), new Color(255, 0, 0));
     Renderer.DrawText((game.StageNo + 1).ToString("00"), new Point(633, 320), new Color(255, 255, 255));
     Renderer.DrawText("MISS", new Point(613, 380), new Color(255, 0, 0));
     Renderer.DrawText(game.MissCount.ToString("00"), new Point(633, 420), new Color(255, 255, 255));
 }