Example #1
0
        public static void EventSubsystemToComponentTest()
        {
            Application a = new Application();
            Scene       s = new Scene();

            s.AddSubSystem(new TestSubSystem());
            SimulationObject   o = s.AddObject();
            LifeCycleComponent c = o.AddComponent <LifeCycleComponent>();

            a.LoadScene(s);
            ManualScheduler sc = new ManualScheduler();

            a.Scheduler = sc;

            a.Start();
            sc.ManualUpdate();
            a.Stop();
        }
Example #2
0
        public static void EventLifecycleTest()
        {
            Application        a = new Application();
            Scene              s = new Scene();
            SimulationObject   o = s.AddObject();
            LifeCycleComponent c = o.AddComponent <LifeCycleComponent>();

            c.Log = true;

            a.LoadScene(s);
            ManualScheduler sc = new ManualScheduler();

            a.Scheduler = sc;

            a.Start();
            sc.ManualUpdate();
            a.Stop();
        }