/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Editor game = new Editor()) { game.Run(); } }
/// <summary> /// Initializes a new instance of the <see cref="SticKart"/> class. /// </summary> public SticKart() { this.notificationManager = null; this.gameState = GameState.InMenu; this.TargetElapsedTime = TimeSpan.FromSeconds(SticKart.FrameTime); this.screenDimensions = new Vector2(1360.0f, 768.0f); this.graphics = new GraphicsDeviceManager(this); this.graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft; this.graphics.PreferredBackBufferWidth = (int)this.screenDimensions.X; this.graphics.PreferredBackBufferHeight = (int)this.screenDimensions.Y; Camera2D.Initialize(this.screenDimensions); this.headsUpDisplay = new HeadsUpDisplay(this.screenDimensions); this.Content.RootDirectory = "Content"; this.inputManager = new InputManager(this.screenDimensions, ControlDevice.Kinect, SticKart.DisplayColourStream); this.levelManager = new LevelManager(this.screenDimensions, SticKart.FrameTime); this.levelEditor = new Editor(this.screenDimensions); this.menuManager = new MenuManager(this.screenDimensions); this.menuManager.OnBeginLevelDetected += this.BeginLevel; this.menuManager.OnQuitGameDetected += this.QuitGame; this.menuManager.OnEditLevelSelected += this.EditLevel; this.menuManager.OnEditorSaveSelected += this.SaveCustomLevel; this.menuManager.OnEditorUndoSelected += this.EditorUndo; this.menuManager.OnEditorTypeSelected += this.EditorChangeType; this.menuManager.OnResumeGameDetected += this.UnpauseGame; this.handSprite = new Sprite(); this.graphics.IsFullScreen = true; // TODO: set to true for release }