Program.cs 739 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using Base;
  3. using Object = Base.Object;
  4. namespace App
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. try
  11. {
  12. Object.ObjectManager.Register("Model", typeof(Scene).Assembly);
  13. Server.Scene.AddComponent<EventComponent>();
  14. Server.Scene.AddComponent<TimerComponent>();
  15. Server.Scene.AddComponent<NetworkComponent, NetworkProtocol>(NetworkProtocol.UDP);
  16. Server.Scene.AddComponent<Scene, SceneType, string>(SceneType.Realm, "realm");
  17. Server.Scene.AddComponent<MessageHandlerComponent, SceneType>(Server.Scene.GetComponent<Scene>().SceneType);
  18. while (true)
  19. {
  20. Object.ObjectManager.Update();
  21. }
  22. }
  23. catch (Exception e)
  24. {
  25. Log.Error(e.ToString());
  26. }
  27. }
  28. }
  29. }