Game.cs 327 B

12345678910111213141516171819202122232425262728
  1. using Base;
  2. namespace Model
  3. {
  4. public sealed class Game
  5. {
  6. private static Entity game;
  7. public static Entity Scene
  8. {
  9. get
  10. {
  11. if (game == null)
  12. {
  13. game = new Entity();
  14. }
  15. return game;
  16. }
  17. }
  18. public static void Close()
  19. {
  20. Entity scene = game;
  21. game = null;
  22. scene.Dispose();
  23. }
  24. }
  25. }