Browse Source

Renamed StartGameMusic to StartMusic and StopGameMusic to StopMusic

master
chrisgregan 11 years ago
parent
commit
0e36980c65
  1. 4
      Assets/Fungus/Scripts/GameController.cs
  2. 12
      Assets/FungusExample/Scripts/AudioRoom.cs

4
Assets/Fungus/Scripts/GameController.cs

@ -226,14 +226,14 @@ public class GameController : MonoBehaviour
}
// Plays game music using an audio clip
public void PlayGameMusic(AudioClip audioClip)
public void PlayMusic(AudioClip audioClip)
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new PlayMusicCommand(audioClip));
}
// Stops playing game music
public void StopGameMusic()
public void StopMusic()
{
CommandQueue commandQueue = Game.GetInstance().commandQueue;
commandQueue.AddCommand(new StopMusicCommand());

12
Assets/FungusExample/Scripts/AudioRoom.cs

@ -12,7 +12,7 @@ public class AudioRoom : Room
{
if (GetFlag("music"))
{
AddOption("Stop the music", StopMusic);
AddOption("Stop the music", StopGameMusic);
if (GetFlag("quiet") == false)
{
@ -21,7 +21,7 @@ public class AudioRoom : Room
}
else
{
AddOption("Play some music", StartMusic);
AddOption("Play some music", StartGameMusic);
}
AddOption("Play a sound effect", PlaySound);
AddOption("Back to menu", MainMenu);
@ -36,17 +36,17 @@ public class AudioRoom : Room
}
}
void StartMusic()
void StartGameMusic()
{
PlayGameMusic(musicClip);
PlayMusic(musicClip);
SetMusicVolume(1f);
SetFlag("music", true);
Call(OnEnter);
}
void StopMusic()
void StopGameMusic()
{
StopGameMusic();
StopMusic();
SetFlag("music", false);
SetFlag("quiet", false);
Call(OnEnter);

Loading…
Cancel
Save