Beispiel #1
0
        static void Main(string[] args)
        {
            Stopwatch s = new Stopwatch();

            s.Start();



            EntityManager entityManager = new EntityManager();

            MessageManager.AddSystem(entityManager);

            EngineSystem es = new EngineSystem();

            es.Init();
            es.SendMessage(new Message(MessageType.GLOBAL_MESSAGE, es));

            MessageManager.SendMessageBroadcast(new Message(MessageType.GLOBAL_MESSAGE, null));


            s.Stop();
            Logger.Log($"Passed time {s.Elapsed}", LogStatus.DEBUG);
        }
Beispiel #2
0
 public static void RemoveSystem(EngineSystem system)
 {
     globalEngineSystems.Remove(system);
 }
Beispiel #3
0
 public static void AddSystem(EngineSystem system)
 {
     globalEngineSystems.Add(system);
 }
Beispiel #4
0
 public Message(MessageType type, EngineSystem owner, object data = null)
 {
     this.type  = type;
     this.owner = owner;
     this.data  = data;
 }