diff --git a/Assets/Resources/Sfx/games/karateman/hitAlt.wav.meta b/Assets/Resources/Sfx/games/karateman/hitAlt.wav.meta new file mode 100644 index 00000000..17a07dde --- /dev/null +++ b/Assets/Resources/Sfx/games/karateman/hitAlt.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4c9b12983f5db8f47825744ae20b55f0 +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: diff --git a/Assets/Resources/Sfx/games/karateman/threeAlt.wav.meta b/Assets/Resources/Sfx/games/karateman/threeAlt.wav.meta new file mode 100644 index 00000000..74db3588 --- /dev/null +++ b/Assets/Resources/Sfx/games/karateman/threeAlt.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 343bf4faedef49e41ae0d19006e3ad2e +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: diff --git a/Assets/Resources/Sfx/games/karateman/two.ogg.meta b/Assets/Resources/Sfx/games/karateman/two.ogg.meta new file mode 100644 index 00000000..c3420d0b --- /dev/null +++ b/Assets/Resources/Sfx/games/karateman/two.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6abad4e4e0bb4134d9cc5e495329896c +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: diff --git a/Assets/Scripts/Games/KarateMan/KarateMan.cs b/Assets/Scripts/Games/KarateMan/KarateMan.cs index 14d46470..04f7f593 100644 --- a/Assets/Scripts/Games/KarateMan/KarateMan.cs +++ b/Assets/Scripts/Games/KarateMan/KarateMan.cs @@ -20,6 +20,14 @@ namespace RhythmHeavenMania.Games.KarateMan TacoBell = 999 } + public enum HitThree + { + HitTwo, + HitThree, + HitThreeAlt, + HitFour + } + public enum LightBulbType { Normal, @@ -303,7 +311,9 @@ namespace RhythmHeavenMania.Games.KarateMan if (timeToEvent <= 1f && timeToEvent > 0f && !cuedVoices.Contains(hitEvent)) { cuedVoices.Add(hitEvent); - MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("karateman/hit", hitEvent.beat - hitVoiceOffset * Conductor.instance.songBpm / 60f) }); + var sound = "karateman/hit"; + if (hitEvent.type == (int)KarateMan.HitThree.HitThreeAlt) sound += "Alt"; + MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound(sound, hitEvent.beat - hitVoiceOffset * Conductor.instance.songBpm / 60f) }); } } } @@ -338,9 +348,16 @@ namespace RhythmHeavenMania.Games.KarateMan bop.startBeat = beat; } - public void Hit3(float beat) + public void Hit2(float beat) { - MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("karateman/three", beat + 0.5f) }); + MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("karateman/two", beat + 0.5f) }); + } + + public void Hit3(float beat, bool alt = false) + { + var sound = "karateman/three"; + if (alt) sound += "Alt"; + MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound(sound, beat + 0.5f) }); GameObject hit3 = Instantiate(HIT3Ref, this.transform); hit3.transform.GetChild(0).GetChild(1).GetComponent().sprite = Numbers[2]; BeatAction.New(hit3, new List() diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 03fb780a..9ac7b0e4 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -230,13 +230,16 @@ namespace RhythmHeavenMania new GameAction("hit3", delegate { var e = eventCaller.currentEntity; - if(e.toggle) - KarateMan.instance.Hit4(e.beat); - else - KarateMan.instance.Hit3(e.beat); + switch ((KarateMan.HitThree)e.type) + { + case KarateMan.HitThree.HitTwo: KarateMan.instance.Hit2(e.beat); break; + case KarateMan.HitThree.HitThreeAlt: KarateMan.instance.Hit3(e.beat, true); break; + case KarateMan.HitThree.HitFour: KarateMan.instance.Hit4(e.beat); break; + default: KarateMan.instance.Hit3(e.beat); break; + } }, 1f, false, new List() { - new Param("toggle", false, "Hit 4", "Whether or not the \"hit 4!\" sound should be played instead") + new Param("type", KarateMan.HitThree.HitThree, "Type", "What should be called out") }), new GameAction("prepare", delegate { KarateMan.instance.Prepare(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 1f, true), new GameAction("set background color", delegate {