Пример #1
0
 private static void OnEngineStart()
 {
     try
     {
         EngineStart?.Invoke();
     }
     catch (Exception ex)
     {
         Trace.WriteLine("Unhandled Exception in " + typeof(Game).Name + ".OnEngineStart!");
         Trace.WriteLine(ex.ToString());
     }
 }
Пример #2
0
        public static void Run()
        {
            EngineStart?.Invoke(null, System.EventArgs.Empty);

            while (Device.IsOpen)
            {
                Device.Clear(ClearFrameColor);

                Update(Device.HasFocus());
                Draw();

                Device.Display();
                Device.DispatchEvents();
            }
        }
Пример #3
0
 internal static void InitializeCompleted()
 {
     EngineStart?.Invoke(null, System.EventArgs.Empty);
 }