Music Help
by Do Not Delete · in Torque X Platformer Kit · 08/28/2007 (4:50 pm) · 1 replies
I've gotten music to work with the Platformer Starter Game (not the Platformer Demo Game) but now that I have added menus it won't work.
Here is the code:
Everything else loads fine such as the HUD and the level but music does not play.
Can anyone help me?
Here is the code:
private void _newGame(float val)
{
if (Epsilon.FloatIsNotZero(val))
{
PlatformerStarter.Game.Instance.SceneLoader.Load(@"data\levels\sample_level.txscene");
GUIStyle playStyle = new GUIStyle();
GUISceneview play = new GUISceneview();
play.Name = "PlayScreen";
play.Style = playStyle;
GUICanvas.Instance.SetContentControl(play);
PlatformerDemoGUI.Instance.GUI.Folder = GUICanvas.Instance;
SoundManager.Instance.RegisterSoundGroup(@"data\sound\Win\SoundBank.xsb", @"data\sound\Win\WaveBank.xwb");
Cue mySound = SoundManager.Instance.PlaySound(@"data\sound\Win\SoundBank.xsb", "game_music");
}
}Everything else loads fine such as the HUD and the level but music does not play.
Can anyone help me?
About the author
Torque Owner Thomas Buscaglia