public SceneManager(Nez.Core myCore) { //Assert.isFalse(myManager == null, "Two scene managers were created!"); myManager = this; this.Core = myCore; }
public Core( int width = 1280, int height = 720, bool isFullScreen = false, bool enableEntitySystems = true, string windowTitle = "Nez" ) { #if DEBUG _windowTitle = windowTitle; #endif _instance = this; emitter = new Emitter<CoreEvents>( new CoreEventsComparer() ); var graphicsManager = new GraphicsDeviceManager( this ); graphicsManager.PreferredBackBufferWidth = width; graphicsManager.PreferredBackBufferHeight = height; graphicsManager.IsFullScreen = isFullScreen; graphicsManager.SynchronizeWithVerticalRetrace = true; graphicsManager.DeviceReset += onGraphicsDeviceReset; graphicsManager.PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8; Screen.initialize( graphicsManager ); Window.ClientSizeChanged += onGraphicsDeviceReset; Window.OrientationChanged += onOrientationChanged; Content.RootDirectory = "Content"; contentManager = new NezGlobalContentManager( Services, Content.RootDirectory ); IsMouseVisible = true; IsFixedTimeStep = false; entitySystemsEnabled = enableEntitySystems; // setup systems _globalManagers.add( _coroutineManager ); _globalManagers.add( new TweenManager() ); _globalManagers.add( _timerManager ); _globalManagers.add( new RenderTarget() ); }