public SceneManager(ContentManager aContentManager) { iEntityManager = new EntityManager(); iContentManager = aContentManager; }
public void Dispose() { iEntityManager.Unload(); iEntityManager = null; iCurrentScene = null; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { entityManager = new EntityManager(); iSceneManager = new SceneManager(Content); iInputHelper = new InputHelper(); iKinect = new KinectAdapter(graphics.GraphicsDevice, (isAvail) => { string title = null; string file = null; if (isAvail) { title = "Connected"; file = "Germz.Icon.ico"; iSceneManager.HideOverlay(); } else { title = "NO KINECT FOUND"; file = "Germz.NoKintec.Icon.ico"; iSceneManager.ShowOverlay(new KinectDisconnect()); } Window.Title = string.Format("Germz | Dynamic Dorks [{0}]", title); var filename = string.Format("Res/{0}", file); ((SForms.Form)SForms.Form.FromHandle(Window.Handle)).Icon = new SDrawing.Icon(filename); }); iKinect.OpenSensor(); //Show Main menu iSceneManager.SetScene(new Entities.Scenes.GameInstance()); colorRenderTarget = new RenderTarget2D(graphics.GraphicsDevice, 512, 424); //gestureRV = new GestureResultView(0, false, false, 0); //gestureDet = new GestureDetector(iKinect.iSensor, gestureRV); iKinect.OpenSensor(); depthHeight = iKinect.iSensor.DepthFrameSource.FrameDescription.Height; depthWidth = iKinect.iSensor.DepthFrameSource.FrameDescription.Width; base.Initialize(); }