aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/FinalMission
diff options
context:
space:
mode:
authorMichaelTheShifter <[email protected]>2016-06-24 16:44:42 -0400
committerMichaelTheShifter <[email protected]>2016-06-24 16:44:51 -0400
commitecee91bc559e1c0d716a3032e371218812df61e7 (patch)
tree49acdb538b13bc3da89185413bc4096d4e6d81f7 /source/WindowsFormsApplication1/FinalMission
parent8ea0903788b02b352cc25c9b6f46d439bdb1356a (diff)
downloadshiftos-c--ecee91bc559e1c0d716a3032e371218812df61e7.tar.gz
shiftos-c--ecee91bc559e1c0d716a3032e371218812df61e7.tar.bz2
shiftos-c--ecee91bc559e1c0d716a3032e371218812df61e7.zip
Loads of changes...
Custom shifter options using Lua, and other stuff.
Diffstat (limited to 'source/WindowsFormsApplication1/FinalMission')
-rw-r--r--source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs25
1 files changed, 10 insertions, 15 deletions
diff --git a/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs b/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs
index 78a8508..c757699 100644
--- a/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs
+++ b/source/WindowsFormsApplication1/FinalMission/ChooseYourApproach.cs
@@ -17,22 +17,19 @@ namespace ShiftOS.FinalMission
{
public partial class ChooseYourApproach : Form
{
- bool Playing = false;
- private AudioResourceClient audioClient = null;
-
+
public ChooseYourApproach()
{
- audioClient = new AudioResourceClient("EndGame;RossBugden");
- InitializeComponent();
- //Music thread.
- audioClient.Play("Rapture");
- audioClient.SongFinished += (object s, EventArgs a) =>
+ Audio.Play("endgame");
+ Audio.Stopped += (o, a) =>
{
- if (musicEnabled)
+ if (this != null)
{
- audioClient.Play("Rapture");
+ Audio.Play("endgame");
}
};
+ InitializeComponent();
+ //Music thread.
}
private void lbdesc_Click(object sender, EventArgs e)
@@ -128,9 +125,7 @@ namespace ShiftOS.FinalMission
private void onClose(object sender, FormClosingEventArgs e)
{
- audioClient.Stop();
- audioClient.Dispose();
- audioClient = null;
+ Audio.ForceStop();
}
bool musicEnabled = true;
@@ -139,11 +134,11 @@ namespace ShiftOS.FinalMission
{
if (musicEnabled)
{
- audioClient.Stop();
+ Audio.ForceStop();
}
else
{
- audioClient.Play("Rapture");
+ Audio.Play("hackerbattle_ambient");
}
musicEnabled = !musicEnabled;
}