Commit 60bbf458 authored by You're Perfect 's avatar You're Perfect

Add exit sound

parent e25267cf
......@@ -9,7 +9,7 @@ public class SoundManager : MonoBehaviour {
public AudioClip ReelSound;
public AudioClip WhaleSound;
public AudioClip SplashSound;
public AudioClip ExitSound;
//These need to be moved to some other class
public Animator LeftBear;
......@@ -39,6 +39,15 @@ public class SoundManager : MonoBehaviour {
Instance.GetComponent<AudioSource>().PlayOneShot(Instance.WhaleSound);
}
private IEnumerator PlayExitMusic()
{
Instance.GetComponent<AudioSource>().Stop();
Instance.GetComponent<AudioSource>().clip = ExitSound;
Instance.GetComponent<AudioSource>().Play();
yield return new WaitForSeconds(3);
Application.Quit();
}
/// <summary>
/// This doesn't belong here but I stuck it here as a quick fix since we know SoundManager is in every scene.
/// </summary>
......@@ -50,7 +59,7 @@ public class SoundManager : MonoBehaviour {
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit ();
StartCoroutine(PlayExitMusic());
#endif
}
else
......
......@@ -379,7 +379,7 @@ MonoBehaviour:
m_FontData:
m_Font: {fileID: 12800000, guid: 31c70f78483478c4cade6ab73dd92e39, type: 3}
m_FontSize: 45
m_FontStyle: 0
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 4
m_MaxSize: 45
......@@ -4935,7 +4935,7 @@ Prefab:
- target: {fileID: 224303368701845452, guid: 674e343b361bf1349b1629910e472d54,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 433
value: -128
objectReference: {fileID: 0}
- target: {fileID: 224303368701845452, guid: 674e343b361bf1349b1629910e472d54,
type: 2}
......@@ -4945,7 +4945,7 @@ Prefab:
- target: {fileID: 224303368701845452, guid: 674e343b361bf1349b1629910e472d54,
type: 2}
propertyPath: m_SizeDelta.x
value: 228.4
value: 228.40002
objectReference: {fileID: 0}
- target: {fileID: 224303368701845452, guid: 674e343b361bf1349b1629910e472d54,
type: 2}
......@@ -4955,7 +4955,7 @@ Prefab:
- target: {fileID: 224303368701845452, guid: 674e343b361bf1349b1629910e472d54,
type: 2}
propertyPath: m_AnchorMin.x
value: 0.5
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224303368701845452, guid: 674e343b361bf1349b1629910e472d54,
type: 2}
......@@ -4965,7 +4965,7 @@ Prefab:
- target: {fileID: 224303368701845452, guid: 674e343b361bf1349b1629910e472d54,
type: 2}
propertyPath: m_AnchorMax.x
value: 0.5
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224303368701845452, guid: 674e343b361bf1349b1629910e472d54,
type: 2}
......@@ -13869,9 +13869,9 @@ RectTransform:
m_Father: {fileID: 39089640}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 407, y: 157}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 357, y: 157}
m_SizeDelta: {x: 233.5, y: 94.7}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &822975910
......@@ -14098,9 +14098,9 @@ RectTransform:
m_Father: {fileID: 39089640}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -399, y: 157}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -349, y: 157}
m_SizeDelta: {x: 233.5, y: 94.7}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &865692386
......@@ -22443,6 +22443,7 @@ MonoBehaviour:
ReelSound: {fileID: 8300000, guid: 79b638574ac96194fb2fa3632c716181, type: 3}
WhaleSound: {fileID: 8300000, guid: 3b6ad2430cf82e9429b4662340a1fc84, type: 3}
SplashSound: {fileID: 8300000, guid: 943ffe894be3e1140a91694720c784c5, type: 3}
ExitSound: {fileID: 8300000, guid: a4685db282617204f9b935d7dad97322, type: 3}
LeftBear: {fileID: 1067172105}
RightBear: {fileID: 1013489032}
MainMenu: {fileID: 597479527}
......@@ -28917,7 +28918,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 96ca32d4fbab2ef48a6fae78cf4569f5, type: 3}
m_Name:
m_EditorClassIdentifier:
MinimumFishCount: 5
MinimumFishCount: 8
fishPrefabs:
- {fileID: 1165079508314556, guid: ea59b9986bae803489712a9b0395b6ec, type: 2}
- {fileID: 1165079508314556, guid: ea59b9986bae803489712a9b0395b6ec, type: 2}
......@@ -29437,12 +29438,12 @@ Prefab:
- target: {fileID: 224995151098169694, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchoredPosition.x
value: -432
value: -382
objectReference: {fileID: 0}
- target: {fileID: 224086270593465334, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 437
value: 387
objectReference: {fileID: 0}
- target: {fileID: 114476655780565822, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
......@@ -29474,6 +29475,66 @@ Prefab:
propertyPath: m_Color.b
value: 0.26432896
objectReference: {fileID: 0}
- target: {fileID: 224995151098169694, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224995151098169694, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224995151098169694, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224995151098169694, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224995151098169694, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 97
objectReference: {fileID: 0}
- target: {fileID: 224995151098169694, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_SizeDelta.y
value: 39.199997
objectReference: {fileID: 0}
- target: {fileID: 224086270593465334, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224086270593465334, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224086270593465334, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224086270593465334, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224086270593465334, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 97
objectReference: {fileID: 0}
- target: {fileID: 224086270593465334, guid: dabac0dd7e12d4c4b8ca699becda6e1d,
type: 2}
propertyPath: m_SizeDelta.y
value: 39.199997
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dabac0dd7e12d4c4b8ca699becda6e1d, type: 2}
m_IsPrefabAsset: 0
......@@ -30736,7 +30797,7 @@ Prefab:
- target: {fileID: 224629621059852676, guid: a196b505e3a5760438f487db120b9974,
type: 2}
propertyPath: m_AnchoredPosition.x
value: -430
value: 131
objectReference: {fileID: 0}
- target: {fileID: 224629621059852676, guid: a196b505e3a5760438f487db120b9974,
type: 2}
......@@ -30756,7 +30817,7 @@ Prefab:
- target: {fileID: 224629621059852676, guid: a196b505e3a5760438f487db120b9974,
type: 2}
propertyPath: m_AnchorMin.x
value: 0.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224629621059852676, guid: a196b505e3a5760438f487db120b9974,
type: 2}
......@@ -30766,7 +30827,7 @@ Prefab:
- target: {fileID: 224629621059852676, guid: a196b505e3a5760438f487db120b9974,
type: 2}
propertyPath: m_AnchorMax.x
value: 0.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224629621059852676, guid: a196b505e3a5760438f487db120b9974,
type: 2}
......
......@@ -44,8 +44,8 @@ PlayerSettings:
m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1024
defaultScreenHeight: 768
defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600
defaultScreenWidthWeb: 1024
defaultScreenHeightWeb: 576
m_StereoRenderingPath: 0
m_ActiveColorSpace: 0
m_MTRendering: 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment