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); }
public ISynchronizationContext GetSynchronizationContext() => currentState.GetSynchronizationContext();