Esempio n. 1
0
        public DefaultEngine(IRenderableSurface surface, IInputManager inputManager, IContextState context, EngineNotificator notificator)
        {
            Context          = context;
            this.Surface     = surface;
            this.Notificator = notificator;
            InputManager     = inputManager;
            tokensource      = new CancellationTokenSource();
            token            = tokensource.Token;

            WorldTag = new ElementTag("World");
            context.GetEntityManager()
            .CreateEntity(WorldTag)
            .AddComponent(new PerfomanceComponent());

            CameraTag = new ElementTag("Camera");
            context.GetEntityManager()
            .CreateEntity(CameraTag);
            context.GetSynchronizationContext().Synchronize(-1);
        }
Esempio n. 2
0
 public ISynchronizationContext GetSynchronizationContext() => currentState.GetSynchronizationContext();