Exemple #1
0
        private void StartNewGame()
        {
            _dodgerWorld = new DodgerWorld(this.Width, this.Height);
            this.Controls.Add(_dodgerWorld);
            _gameState = GameState.Loaded;

            GameTimer.Interval = 50;
            GameTimer.Enabled  = true;
            GameTimer.Start();
            _gameState = GameState.Running;
        }
Exemple #2
0
        public DodgerGame()
        {
            this.Shown += DodgerGame_Shown;
            this.Height = 600;
            this.Width  = 800;

            InitializeComponent();

            _dodgerWorld = new DodgerWorld(this.Width, this.Height);
            this.Controls.Add(_dodgerWorld);

            _gameState = GameState.Loaded;

            GameTimer.Interval = 50;
            GameTimer.Enabled  = true;
            GameTimer.Start();
            _gameState = GameState.Running;
        }