mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-08 18:55:07 +00:00
Added Hit Two and Hit Three Alt (from RHDS) to Karate Man
This commit is contained in:
parent
71838124c9
commit
c73d490485
5 changed files with 94 additions and 8 deletions
22
Assets/Resources/Sfx/games/karateman/hitAlt.wav.meta
Normal file
22
Assets/Resources/Sfx/games/karateman/hitAlt.wav.meta
Normal file
|
@ -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:
|
22
Assets/Resources/Sfx/games/karateman/threeAlt.wav.meta
Normal file
22
Assets/Resources/Sfx/games/karateman/threeAlt.wav.meta
Normal file
|
@ -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:
|
22
Assets/Resources/Sfx/games/karateman/two.ogg.meta
Normal file
22
Assets/Resources/Sfx/games/karateman/two.ogg.meta
Normal file
|
@ -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:
|
|
@ -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<SpriteRenderer>().sprite = Numbers[2];
|
||||
BeatAction.New(hit3, new List<BeatAction.Action>()
|
||||
|
|
|
@ -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<Param>()
|
||||
{
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue