public JewelJamGameWorld(JewelJam game) { this.game = game; SpriteGameObject background = new SpriteGameObject("spr_background"); Size = new Point(background.Width, background.Height); AddChild(background); // Create PlayingField and add it do gameWorld GameObjectList playingField = new GameObjectList(); playingField.Position = new Vector2(85, 150); AddChild(playingField); // Create new grid and add it to playingField JewelGrid grid = new JewelGrid(GridWidth, GridHeight, CellSize); playingField.AddChild(grid); // Create new RowSelector and add it to playingField playingField.AddChild(new RowSelector(grid)); // Add background sprite for the score object SpriteGameObject scoreFrame = new SpriteGameObject("spr_scoreframe"); scoreFrame.Position = new Vector2(20, 20); AddChild(scoreFrame); // Add the object that displays the score ScoreGameObject scoreObject = new ScoreGameObject(); scoreObject.Position = new Vector2(270, 30); AddChild(scoreObject); jewelCart = new JewelCart(new Vector2(410, 230)); AddChild(jewelCart); helpButton = new SpriteGameObject("spr_button_help"); helpButton.Position = new Vector2(1270, 20); AddChild(helpButton); timer_double = AddComboImageWithTimer("spr_double"); timer_triple = AddComboImageWithTimer("spr_triple"); titleScreen = AddOverlay("spr_title"); gameOverScreen = AddOverlay("spr_gameover"); helpScreen = AddOverlay("spr_frame_help"); GoToState(GameState.TitleScreen); ExtendedGame.AssetManager.PlaySong("snd_music", true); }
static void Main() { using (var game = new JewelJam()) game.Run(); }