public Menu() { if (_once == false) { _once = true; DisplayMusicRequest(true); } _dao.Load(); _preloader = SpriteLoader.GetInstance(); _sceneManager = SceneManager.GetInstance(); // _cursor = _preloader.Load("cursor"); _scenery = _preloader.Load("scene"); _title = _preloader.Load("title"); _buttons.Add(new Button(new Vector2(260, 300), SceneManager.Scenes.PLAYSTATE, "Play", true)); _buttons.Add(new Button(new Vector2(260, 400), SceneManager.Scenes.CREDITS, "Credits", true)); _buttons.Add(new Button(new Vector2(260, 500), SceneManager.Scenes.HOWTO, "How To", true)); _buttons.Add(new Button(new Vector2(20, 700), SceneManager.Scenes.SONG1, "Track 1",false)); _buttons.Add(new Button(new Vector2(115, 700), SceneManager.Scenes.SONG2, "Track 2", false)); _buttons.Add(new Button(new Vector2(215, 700), SceneManager.Scenes.SONG3, "Track 3", false)); _buttons.Add(new Button(new Vector2(315, 700), SceneManager.Scenes.SONG4, "Track 4", false)); _buttons.Add(new Button(new Vector2(415, 700), SceneManager.Scenes.SONG5, "Track 5", false)); _buttons.Add(new Button(new Vector2(50,50), SceneManager.Scenes.MUSIC, "Music", false)); _highScores = "HIGHSCORES:--- \n "; for (int i = 0; i < _dao._highscores.Count; i++) { _highScores += i + 1 + ": " + _dao._highscores[i]._highscore + "\n"; } if (Menu._playingMusic == true) { _preloader.PlayMusic("song1"); } }
public static SceneManager GetInstance() { if (_me == null) { _me = new SceneManager(); } return _me; }
public Credits() { _preloader = SpriteLoader.GetInstance(); _sceneManager = SceneManager.GetInstance(); _scenery = _preloader.Load("scene"); _buttons.Add(new Button(new Vector2(150, 500), SceneManager.Scenes.MENU, "Back", true)); }
//private Texture2D _cursor; public TutorialScreen() { _preloader = SpriteLoader.GetInstance(); _page1 = _preloader.Load("page1"); _page2 = _preloader.Load("page2"); _sceneManager = SceneManager.GetInstance(); // _cursor = _preloader.Load("cursor"); }
public PlayState(GraphicsDevice _graphicsDevice) { _hud = new HUD(); _spawner = new BlockSpawner(_graphicsDevice); _preloader.PlayMusic(Menu._song); _scenery = _preloader.Load("scene"); _pauseButton = new Button(new Vector2(150, 730), SceneManager.Scenes.PAUSED, "Pause", true); _unPauseButton = new Button(new Vector2(150, 200), SceneManager.Scenes.UNPAUSED, "Continue?", true); _quitButton = new Button(new Vector2(150, 300), SceneManager.Scenes.MENU, "Quit?", true); _sceneManager = SceneManager.GetInstance(); }
// HighScoreList _highScoreList = new HighScoreList("MyScores"); public WinScreen() { _preloader = SpriteLoader.GetInstance(); _sceneManager = SceneManager.GetInstance(); // _cursor = _preloader.Load("cursor"); _scenery = _preloader.Load("scene"); _buttons.Add(new Button(new Vector2(150, 500), SceneManager.Scenes.MENU, "Back",true)); _dao = DAO.GetInstance(); _dao.AddHighscore(HUD._score); SoundEffect _effect = _preloader.LoadEffect("win"); if (Menu._playingMusic == true) { _effect.Play(); _preloader.StopMusic(); } }
public Button(Vector2 _pos,SceneManager.Scenes _OnClick,String _text,bool _big) { this._big = _big; this._pos = _pos; this._text = _text; this._onClick = _OnClick; _sceneManager = SceneManager.GetInstance(); _preloader = SpriteLoader.GetInstance(); if (_big) { _texture = _preloader.Load("button"); } else { _texture = _preloader.Load("smallbutton"); } }
public Splash() { _preloader = SpriteLoader.GetInstance(); _sceneManager = SceneManager.GetInstance(); _texture = _preloader.Load("splash"); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); _preloader = SpriteLoader.GetInstance();//load them sprites; _preloader.setContentManager(Content); _sceneManager = SceneManager.GetInstance(); _sceneManager.SetGraphicsDevice(GraphicsDevice); // TODO: use this.Content to load your game content here }