Пример #1
0
        private void Step()
        {
            TimeSpan now = DateTime.Now.TimeOfDay;
            Time time = new Time(now - _totalStart, now - _prevStep);
            _prevStep = now;

            _keyboard.Acquire();
            _mouse.Acquire();

            Update(time);

            Draw(time);

            if (!_running)
                _renderEngine.Form.Close();
        }
Пример #2
0
 public void Update(Time time)
 {
     if (_keyboard.GetCurrentState().IsPressed(Key.Escape))
         Exit();
 }
Пример #3
0
        public void Draw(Time time)
        {
            _renderEngine.PrepareScene();

            _renderEngine.DisplayScene();
        }