示例#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();
        }