public BugsGame() { BugsGame.Instance = this; //Instansiate and setup graphics device manager _graphics = new GraphicsDeviceManager(this) { IsFullScreen = true, PreferredBackBufferHeight = 480, PreferredBackBufferWidth = 800, SupportedOrientations = DisplayOrientation.LandscapeRight | DisplayOrientation.LandscapeLeft }; // Create the screen factory and add it to the Services Services.AddService(typeof(IScreenFactory), new ScreenFactory()); // Create the screen manager component. _screenManager = new ScreenManager(this); Components.Add(_screenManager); _controller = new Controller(_screenManager); //Set Content root directory Content.RootDirectory = "Content"; // Frame rate is 30 fps by default for Windows Phone // The original "WeAreBugs" runs at 60 fps - so we do that too in XNA TargetElapsedTime = TimeSpan.FromSeconds(1f / 60f); // Extend battery life under lock. InactiveSleepTime = TimeSpan.FromSeconds(1); }
public Controller(ScreenManager screenManager) { _screenManager = screenManager; }