Skip to content
Snippets Groups Projects
Commit 9b80d786 authored by Tony Pohto's avatar Tony Pohto
Browse files

ultimate musa lisätty

parent 404da79e
No related branches found
No related tags found
No related merge requests found
File added
fileFormatVersion: 2
guid: 515d97e3fc007c24ba400579e4b7e91d
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
...@@ -321,6 +321,7 @@ MonoBehaviour: ...@@ -321,6 +321,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2d496a86a17b9d0489876dbf81a4e9bc, type: 3} m_Script: {fileID: 11500000, guid: 2d496a86a17b9d0489876dbf81a4e9bc, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
endGame: {fileID: 0}
--- !u!212 &427384616 --- !u!212 &427384616
SpriteRenderer: SpriteRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1076,7 +1077,7 @@ PrefabInstance: ...@@ -1076,7 +1077,7 @@ PrefabInstance:
- target: {fileID: 203678261489018089, guid: 530bea3a047bd31458b647c456257c63, - target: {fileID: 203678261489018089, guid: 530bea3a047bd31458b647c456257c63,
type: 3} type: 3}
propertyPath: musics.Array.size propertyPath: musics.Array.size
value: 11 value: 12
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 203678261489018089, guid: 530bea3a047bd31458b647c456257c63, - target: {fileID: 203678261489018089, guid: 530bea3a047bd31458b647c456257c63,
type: 3} type: 3}
...@@ -1133,6 +1134,11 @@ PrefabInstance: ...@@ -1133,6 +1134,11 @@ PrefabInstance:
propertyPath: musics.Array.data[10] propertyPath: musics.Array.data[10]
value: value:
objectReference: {fileID: 8300000, guid: 584a9744e24de204abc89d99211a232b, type: 3} objectReference: {fileID: 8300000, guid: 584a9744e24de204abc89d99211a232b, type: 3}
- target: {fileID: 203678261489018089, guid: 530bea3a047bd31458b647c456257c63,
type: 3}
propertyPath: musics.Array.data[11]
value:
objectReference: {fileID: 8300000, guid: 515d97e3fc007c24ba400579e4b7e91d, type: 3}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 530bea3a047bd31458b647c456257c63, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 530bea3a047bd31458b647c456257c63, type: 3}
--- !u!1 &1968252522 --- !u!1 &1968252522
......
...@@ -28,7 +28,7 @@ public class AudioSystem : MonoBehaviour, IAction ...@@ -28,7 +28,7 @@ public class AudioSystem : MonoBehaviour, IAction
public void React(EventType type) { public void React(EventType type) {
if (type == EventType.GameStarts) if (type == EventType.GameStarts)
{ {
StartCoroutine("GameStartsClip"); GameStartsClip();
} }
if (type == EventType.CitySmall) if (type == EventType.CitySmall)
{ {
...@@ -70,32 +70,34 @@ public class AudioSystem : MonoBehaviour, IAction ...@@ -70,32 +70,34 @@ public class AudioSystem : MonoBehaviour, IAction
{ {
WinClip(); WinClip();
} }
if (type == EventType.Ultimate)
{
UltimateClip();
}
} }
public IEnumerator GameStartsClip() public void GameStartsClip()
{ {
StartCoroutine("PlayEffect", 6); StartCoroutine("PlayEffect", 6);
yield return new WaitForSeconds(2); StartCoroutine("FadeOutIn", new Timing(1, 1));
ac.clip = musics[1];
StartCoroutine("FadeIn", 0);
} }
public void CitySmallClip() public void CitySmallClip()
{ {
StartCoroutine("FadeOutIn", new Timing(3, 1)); StartCoroutine("FadeOutIn", new Timing(2, 1));
} }
public void CityBigClip() public void CityBigClip()
{ {
StartCoroutine("FadeOutIn", new Timing(3, 2)); StartCoroutine("FadeOutIn", new Timing(1, 2));
} }
public void HuntingSmallClip() public void HuntingSmallClip()
{ {
StartCoroutine("FadeOutIn", new Timing(2, 4)); StartCoroutine("FadeOutIn", new Timing(1, 3));
} }
public void HuntingBigClip() public void HuntingBigClip()
{ {
StartCoroutine("FadeOutIn", new Timing(2, 5)); StartCoroutine("FadeOutIn", new Timing(1, 5));
} }
public void WoodClip() public void WoodClip()
{ {
...@@ -121,6 +123,11 @@ public class AudioSystem : MonoBehaviour, IAction ...@@ -121,6 +123,11 @@ public class AudioSystem : MonoBehaviour, IAction
{ {
StartCoroutine("FadeOutIn", new Timing(1, 10)); StartCoroutine("FadeOutIn", new Timing(1, 10));
} }
public void UltimateClip()
{
StartCoroutine("FadeOutIn", new Timing(1, 11));
}
IEnumerator FadeOutIn(Timing t) { IEnumerator FadeOutIn(Timing t) {
//yield return FadeOut(t.duration); //yield return FadeOut(t.duration);
yield return StartCoroutine("FadeOut", t.duration); yield return StartCoroutine("FadeOut", t.duration);
......
...@@ -12,6 +12,7 @@ public enum EventType ...@@ -12,6 +12,7 @@ public enum EventType
HuntingSmall, HuntingSmall,
HuntingBig, HuntingBig,
WinMusic, WinMusic,
MenuMusic,
Ultimate, Ultimate,
//effects //effects
WoodChopped, WoodChopped,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment