public void Dispose() { screen.Current?.Dispose(); music.Dispose(); instance = null; }
public Ingame(SpriteBatch spriteBatch, GraphicsDevice gDevice) { if (instance != null) { throw new Exception(); } instance = this; this.spriteBatch = spriteBatch; this.gDevice = gDevice; screen = new UpdrawEnumerator(WholeGame()); music = Music.dialogueMusic.CreateInstance(); music.IsLooped = true; music.Volume = 0.3f; music.Play(); }
private void NewIngame() { ingame = new Ingame(spriteBatch, GraphicsDevice); }