mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-13 21:25:09 +00:00
Merge pull request #30 from CarsonKompon/editor-event-cleanup-pass-1
Editor Event Cleanup Pass
This commit is contained in:
commit
8a20ee67e5
6 changed files with 196 additions and 100 deletions
|
@ -9563,7 +9563,7 @@ MonoBehaviour:
|
||||||
gridGameSelector: {fileID: 1154875947}
|
gridGameSelector: {fileID: 1154875947}
|
||||||
IntegerP: {fileID: 396879232}
|
IntegerP: {fileID: 396879232}
|
||||||
FloatP: {fileID: 345301789}
|
FloatP: {fileID: 345301789}
|
||||||
BooleanP: {fileID: 0}
|
BooleanP: {fileID: 755586977}
|
||||||
DropdownP: {fileID: 184838087}
|
DropdownP: {fileID: 184838087}
|
||||||
ColorP: {fileID: 1443721746}
|
ColorP: {fileID: 1443721746}
|
||||||
entity:
|
entity:
|
||||||
|
|
|
@ -84,7 +84,7 @@ namespace RhythmHeavenMania.Games.DJSchool
|
||||||
bop.length = length;
|
bop.length = length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BreakCmon(float beat, int type)
|
public void BreakCmon(float beat, int type, bool ooh)
|
||||||
{
|
{
|
||||||
if (djYellowHolding) return;
|
if (djYellowHolding) return;
|
||||||
|
|
||||||
|
@ -103,12 +103,17 @@ namespace RhythmHeavenMania.Games.DJSchool
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
var sound = new MultiSound.Sound[]
|
||||||
{
|
{
|
||||||
new MultiSound.Sound(sounds[0], beat),
|
new MultiSound.Sound(sounds[0], beat),
|
||||||
new MultiSound.Sound(sounds[1], beat + 1f - (0.030f/Conductor.instance.secPerBeat)*Conductor.instance.musicSource.pitch),
|
new MultiSound.Sound(sounds[1], beat + 1f - (0.030f/Conductor.instance.secPerBeat)*Conductor.instance.musicSource.pitch),
|
||||||
new MultiSound.Sound(sounds[2], beat + 2f),
|
new MultiSound.Sound("", beat + 2f)
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (ooh)
|
||||||
|
sound[2] = new MultiSound.Sound(sounds[2], beat + 2f);
|
||||||
|
|
||||||
|
MultiSound.Play(sound);
|
||||||
|
|
||||||
BeatAction.New(djYellow, new List<BeatAction.Action>()
|
BeatAction.New(djYellow, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
|
@ -122,16 +127,21 @@ namespace RhythmHeavenMania.Games.DJSchool
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AndStop(float beat)
|
public void AndStop(float beat, bool ooh)
|
||||||
{
|
{
|
||||||
if (djYellowHolding) return;
|
if (djYellowHolding) return;
|
||||||
|
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
var sound = new MultiSound.Sound[]
|
||||||
{
|
{
|
||||||
new MultiSound.Sound("djSchool/andStop1", beat),
|
new MultiSound.Sound("djSchool/andStop1", beat),
|
||||||
new MultiSound.Sound("djSchool/andStop2", beat + .5f - (0.1200f/Conductor.instance.secPerBeat)*Conductor.instance.musicSource.pitch),
|
new MultiSound.Sound("djSchool/andStop2", beat + .5f - (0.1200f/Conductor.instance.secPerBeat)*Conductor.instance.musicSource.pitch),
|
||||||
new MultiSound.Sound("djSchool/oohAlt", beat + 1.5f),
|
new MultiSound.Sound("", beat + 1.5f)
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (ooh)
|
||||||
|
sound[2] = new MultiSound.Sound("djSchool/oohAlt", beat + 1.5f);
|
||||||
|
|
||||||
|
MultiSound.Play(sound);
|
||||||
|
|
||||||
BeatAction.New(djYellow, new List<BeatAction.Action>()
|
BeatAction.New(djYellow, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,15 @@ namespace RhythmHeavenMania.Games.ForkLifter
|
||||||
{
|
{
|
||||||
public class ForkLifter : Minigame
|
public class ForkLifter : Minigame
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public enum FlickType
|
||||||
|
{
|
||||||
|
Pea,
|
||||||
|
TopBun,
|
||||||
|
Burger,
|
||||||
|
BottomBun
|
||||||
|
}
|
||||||
|
|
||||||
public static ForkLifter instance;
|
public static ForkLifter instance;
|
||||||
|
|
||||||
[Header("References")]
|
[Header("References")]
|
||||||
|
|
|
@ -121,113 +121,71 @@ namespace RhythmHeavenMania
|
||||||
}),
|
}),
|
||||||
new Minigame("countIn", "Count-Ins", "", false, true, new List<GameAction>()
|
new Minigame("countIn", "Count-Ins", "", false, true, new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("4 beat count-in", delegate
|
new GameAction("4 beat count-in", delegate { var e = eventCaller.currentEntity; SoundEffects.FourBeatCountIn(e.beat, e.length / 4f, e.type); }, 4f, true, new List<Param>()
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
new Param("type", SoundEffects.CountInType.Normal, "Type")
|
||||||
{
|
}),
|
||||||
new MultiSound.Sound("count-ins/one1", eventCaller.currentEntity.beat),
|
new GameAction("8 beat count-in", delegate { var e = eventCaller.currentEntity; SoundEffects.EightBeatCountIn(e.beat, e.length / 8f, e.type); }, 8f, true, new List<Param>()
|
||||||
new MultiSound.Sound("count-ins/two1", eventCaller.currentEntity.beat + 1f),
|
|
||||||
new MultiSound.Sound("count-ins/three1", eventCaller.currentEntity.beat + 2f),
|
|
||||||
new MultiSound.Sound("count-ins/four1", eventCaller.currentEntity.beat + 3f)
|
|
||||||
}, false);
|
|
||||||
}, 4f),
|
|
||||||
new GameAction("4 beat count-in (alt)", delegate
|
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
new Param("type", SoundEffects.CountInType.Normal, "Type")
|
||||||
{
|
}),
|
||||||
new MultiSound.Sound("count-ins/one2", eventCaller.currentEntity.beat),
|
new GameAction("count", delegate { var e = eventCaller.currentEntity; SoundEffects.Count(e.type, e.toggle); }, 1f, false, new List<Param>()
|
||||||
new MultiSound.Sound("count-ins/two2", eventCaller.currentEntity.beat + 1f),
|
|
||||||
new MultiSound.Sound("count-ins/three2", eventCaller.currentEntity.beat + 2f),
|
|
||||||
new MultiSound.Sound("count-ins/four2", eventCaller.currentEntity.beat + 3f)
|
|
||||||
}, false);
|
|
||||||
}, 4f),
|
|
||||||
new GameAction("4 beat count-in (cowbell)", delegate
|
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
new Param("type", SoundEffects.CountNumbers.One, "Number"),
|
||||||
{
|
new Param("toggle", false, "Alt")
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat),
|
}),
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat + 1f),
|
new GameAction("cowbell", delegate { SoundEffects.Cowbell(); }, 1f),
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat + 2f),
|
new GameAction("ready!", delegate { var e = eventCaller.currentEntity; SoundEffects.Ready(e.beat, e.length / 2f); }, 2f, true),
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat + 3f)
|
new GameAction("and", delegate {SoundEffects.And(); }, 0.5f),
|
||||||
}, false);
|
new GameAction("go!", delegate { SoundEffects.Go(eventCaller.currentEntity.toggle); }, 1f, false, new List<Param>()
|
||||||
}, 4f),
|
|
||||||
new GameAction("8 beat count-in", delegate
|
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
new Param("toggle", false, "Alt")
|
||||||
{
|
}),
|
||||||
new MultiSound.Sound("count-ins/one1", eventCaller.currentEntity.beat),
|
// These are still here for backwards-compatibility but are hidden in the editor
|
||||||
new MultiSound.Sound("count-ins/two1", eventCaller.currentEntity.beat + 2f),
|
new GameAction("4 beat count-in (alt)", delegate { var e = eventCaller.currentEntity; SoundEffects.FourBeatCountIn(e.beat, e.length, 1); }, 4f, hidden: true),
|
||||||
new MultiSound.Sound("count-ins/one1", eventCaller.currentEntity.beat + 4f),
|
new GameAction("4 beat count-in (cowbell)", delegate { var e = eventCaller.currentEntity; SoundEffects.FourBeatCountIn(e.beat, e.length, 2); }, 4f, hidden: true),
|
||||||
new MultiSound.Sound("count-ins/two1", eventCaller.currentEntity.beat + 5f),
|
new GameAction("8 beat count-in (alt)", delegate { var e = eventCaller.currentEntity; SoundEffects.EightBeatCountIn(e.beat, e.length, 1); }, 4f, hidden: true),
|
||||||
new MultiSound.Sound("count-ins/three1", eventCaller.currentEntity.beat + 6f),
|
new GameAction("8 beat count-in (cowbell)", delegate { var e = eventCaller.currentEntity; SoundEffects.EightBeatCountIn(e.beat, e.length, 2); }, 4f, hidden: true),
|
||||||
new MultiSound.Sound("count-ins/four1", eventCaller.currentEntity.beat + 7f)
|
new GameAction("one", delegate { SoundEffects.Count(0, false); }, 1f, hidden: true),
|
||||||
}, false);
|
new GameAction("one (alt)", delegate { SoundEffects.Count(0, true); }, 1f, hidden: true),
|
||||||
}, 8f),
|
new GameAction("two", delegate { SoundEffects.Count(1, false); }, 1f, hidden: true),
|
||||||
new GameAction("8 beat count-in (alt)", delegate
|
new GameAction("two (alt)", delegate { SoundEffects.Count(1, true); }, 1f, hidden: true),
|
||||||
{
|
new GameAction("three", delegate { SoundEffects.Count(2, false); }, 1f, hidden: true),
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
new GameAction("three (alt)", delegate { SoundEffects.Count(2, true); }, 1f, hidden: true),
|
||||||
{
|
new GameAction("four", delegate { SoundEffects.Count(3, false); }, 1f, hidden: true),
|
||||||
new MultiSound.Sound("count-ins/one2", eventCaller.currentEntity.beat),
|
new GameAction("four (alt)", delegate { SoundEffects.Count(3, true); }, 1f, hidden: true),
|
||||||
new MultiSound.Sound("count-ins/two2", eventCaller.currentEntity.beat + 2f),
|
new GameAction("go! (alt)", delegate { SoundEffects.Go(true); }, 1f, hidden: true),
|
||||||
new MultiSound.Sound("count-ins/one2", eventCaller.currentEntity.beat + 4f),
|
|
||||||
new MultiSound.Sound("count-ins/two2", eventCaller.currentEntity.beat + 5f),
|
|
||||||
new MultiSound.Sound("count-ins/three2", eventCaller.currentEntity.beat + 6f),
|
|
||||||
new MultiSound.Sound("count-ins/four2", eventCaller.currentEntity.beat + 7f)
|
|
||||||
}, false);
|
|
||||||
}, 8f),
|
|
||||||
new GameAction("8 beat count-in (cowbell)", delegate
|
|
||||||
{
|
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
|
||||||
{
|
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat),
|
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat + 2f),
|
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat + 4f),
|
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat + 5f),
|
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat + 6f),
|
|
||||||
new MultiSound.Sound("count-ins/cowbell", eventCaller.currentEntity.beat + 7f)
|
|
||||||
}, false);
|
|
||||||
}, 8f),
|
|
||||||
new GameAction("cowbell", delegate { Jukebox.PlayOneShot("count-ins/cowbell"); }, 1f),
|
|
||||||
new GameAction("one", delegate { Jukebox.PlayOneShot("count-ins/one1"); }, 1f),
|
|
||||||
new GameAction("one (alt)", delegate { Jukebox.PlayOneShot("count-ins/one2"); }, 1f),
|
|
||||||
new GameAction("two", delegate { Jukebox.PlayOneShot("count-ins/two1"); }, 1f),
|
|
||||||
new GameAction("two (alt)", delegate { Jukebox.PlayOneShot("count-ins/two2"); }, 1f),
|
|
||||||
new GameAction("three", delegate { Jukebox.PlayOneShot("count-ins/three1"); }, 1f),
|
|
||||||
new GameAction("three (alt)", delegate { Jukebox.PlayOneShot("count-ins/three2"); }, 1f),
|
|
||||||
new GameAction("four", delegate { Jukebox.PlayOneShot("count-ins/four1"); }, 1f),
|
|
||||||
new GameAction("four (alt)", delegate { Jukebox.PlayOneShot("count-ins/four2"); }, 1f),
|
|
||||||
new GameAction("and", delegate { Jukebox.PlayOneShot("count-ins/and"); }, 0.5f),
|
|
||||||
new GameAction("go!", delegate { Jukebox.PlayOneShot("count-ins/go1"); }, 1f),
|
|
||||||
new GameAction("go! (alt)", delegate { Jukebox.PlayOneShot("count-ins/go2"); }, 1f),
|
|
||||||
new GameAction("ready!", delegate
|
|
||||||
{
|
|
||||||
MultiSound.Play(new MultiSound.Sound[]
|
|
||||||
{
|
|
||||||
new MultiSound.Sound("count-ins/ready1", eventCaller.currentEntity.beat),
|
|
||||||
new MultiSound.Sound("count-ins/ready2", eventCaller.currentEntity.beat + 1f),
|
|
||||||
}, false);
|
|
||||||
}, 2f),
|
|
||||||
}),
|
}),
|
||||||
new Minigame("forkLifter", "Fork Lifter", "FFFFFF", false, false, new List<GameAction>()
|
new Minigame("forkLifter", "Fork Lifter", "FFFFFF", false, false, new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("pea", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 0); }, 3),
|
new GameAction("flick", delegate { var e = eventCaller.currentEntity; ForkLifter.instance.Flick(e.beat, e.type); }, 3, false, new List<Param>()
|
||||||
new GameAction("topbun", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 1); }, 3),
|
{
|
||||||
new GameAction("burger", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 2); }, 3),
|
new Param("type", ForkLifter.FlickType.Pea, "Object")
|
||||||
new GameAction("bottombun", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 3); }, 3),
|
}),
|
||||||
new GameAction("prepare", delegate { ForkLifter.instance.ForkLifterHand.Prepare(); }, 0.5f),
|
new GameAction("prepare", delegate { ForkLifter.instance.ForkLifterHand.Prepare(); }, 0.5f),
|
||||||
new GameAction("gulp", delegate { ForkLifterPlayer.instance.Eat(); }),
|
new GameAction("gulp", delegate { ForkLifterPlayer.instance.Eat(); }),
|
||||||
new GameAction("sigh", delegate { Jukebox.PlayOneShot("games/forkLifter/sigh"); })
|
new GameAction("sigh", delegate { Jukebox.PlayOneShot("games/forkLifter/sigh"); }),
|
||||||
|
// These are still here for backwards-compatibility but are hidden in the editor
|
||||||
|
new GameAction("pea", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 0); }, 3, hidden: true),
|
||||||
|
new GameAction("topbun", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 1); }, 3, hidden: true),
|
||||||
|
new GameAction("burger", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 2); }, 3, hidden: true),
|
||||||
|
new GameAction("bottombun", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 3); }, 3, hidden: true),
|
||||||
|
|
||||||
}),
|
}),
|
||||||
new Minigame("clappyTrio", "The Clappy Trio", "29E7FF", false, false, new List<GameAction>()
|
new Minigame("clappyTrio", "The Clappy Trio", "29E7FF", false, false, new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("clap", delegate { ClappyTrio.instance.Clap(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 3, true),
|
new GameAction("clap", delegate { ClappyTrio.instance.Clap(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 3, true),
|
||||||
new GameAction("bop", delegate { ClappyTrio.instance.Bop(eventCaller.currentEntity.beat); } ),
|
new GameAction("bop", delegate { ClappyTrio.instance.Bop(eventCaller.currentEntity.beat); } ),
|
||||||
new GameAction("prepare", delegate { ClappyTrio.instance.Prepare(0); } ),
|
new GameAction("prepare", delegate { ClappyTrio.instance.Prepare(eventCaller.currentEntity.toggle ? 3 : 0); }, parameters: new List<Param>()
|
||||||
new GameAction("prepare_alt", delegate { ClappyTrio.instance.Prepare(3); } ),
|
{
|
||||||
|
new Param("toggle", false, "Alt")
|
||||||
|
}),
|
||||||
new GameAction("change lion count", delegate { ClappyTrio.instance.ChangeLionCount((int)eventCaller.currentEntity.valA); }, 0.5f, false, new List<Param>()
|
new GameAction("change lion count", delegate { ClappyTrio.instance.ChangeLionCount((int)eventCaller.currentEntity.valA); }, 0.5f, false, new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("valA", new EntityTypes.Integer(1, 8, 3), "Lion Count")
|
new Param("valA", new EntityTypes.Integer(1, 8, 3), "Lion Count")
|
||||||
}),
|
}),
|
||||||
|
// This is still here for backwards-compatibility but is hidden in the editor
|
||||||
|
new GameAction("prepare_alt", delegate { ClappyTrio.instance.Prepare(3); }, hidden: true),
|
||||||
}),
|
}),
|
||||||
new Minigame("spaceball", "Spaceball", "00A518", false, false, new List<GameAction>()
|
new Minigame("spaceball", "Spaceball", "00A518", false, false, new List<GameAction>()
|
||||||
{
|
{
|
||||||
|
@ -321,10 +279,14 @@ namespace RhythmHeavenMania
|
||||||
new Minigame("djSchool", "DJ School", "008c97", false, false, new List<GameAction>()
|
new Minigame("djSchool", "DJ School", "008c97", false, false, new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("bop", delegate { DJSchool.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 0.5f, true),
|
new GameAction("bop", delegate { DJSchool.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 0.5f, true),
|
||||||
new GameAction("and stop ooh", delegate { DJSchool.instance.AndStop(eventCaller.currentEntity.beat); }, 2.5f),
|
new GameAction("and stop ooh", delegate { var e = eventCaller.currentEntity; DJSchool.instance.AndStop(e.beat, e.toggle); }, 2.5f, false, new List<Param>()
|
||||||
new GameAction("break c'mon ooh", delegate { DJSchool.instance.BreakCmon(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); }, 3f, false, new List<Param>()
|
{
|
||||||
|
new Param("toggle", true, "Ooh")
|
||||||
|
}),
|
||||||
|
new GameAction("break c'mon ooh", delegate { var e = eventCaller.currentEntity; DJSchool.instance.BreakCmon(e.beat, e.type, e.toggle); }, 3f, false, new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", DJSchool.DJVoice.Standard, "Voice"),
|
new Param("type", DJSchool.DJVoice.Standard, "Voice"),
|
||||||
|
new Param("toggle", true, "Ooh")
|
||||||
}),
|
}),
|
||||||
new GameAction("scratch-o hey", delegate { DJSchool.instance.ScratchoHey(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); }, 3f, false, new List<Param>()
|
new GameAction("scratch-o hey", delegate { DJSchool.instance.ScratchoHey(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); }, 3f, false, new List<Param>()
|
||||||
{
|
{
|
||||||
|
|
104
Assets/Scripts/SoundEffects.cs
Normal file
104
Assets/Scripts/SoundEffects.cs
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
using RhythmHeavenMania.Util;
|
||||||
|
|
||||||
|
namespace RhythmHeavenMania
|
||||||
|
{
|
||||||
|
public class SoundEffects : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
public enum CountNumbers { One, Two, Three, Four }
|
||||||
|
public static string[] countNames = { "one", "two", "three", "four" };
|
||||||
|
public static void Count(int type, bool alt)
|
||||||
|
{
|
||||||
|
string sound = countNames[type];
|
||||||
|
if (!alt)
|
||||||
|
sound += "1";
|
||||||
|
else
|
||||||
|
sound += "2";
|
||||||
|
Jukebox.PlayOneShot("count-ins/" + sound);
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CountInType { Normal, Alt, Cowbell }
|
||||||
|
public static string[] GetCountInSounds(string[] sounds, CountInType type)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < sounds.Length; i++)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case CountInType.Normal:
|
||||||
|
sounds[i] += "1";
|
||||||
|
break;
|
||||||
|
case CountInType.Alt:
|
||||||
|
sounds[i] += "2";
|
||||||
|
break;
|
||||||
|
case CountInType.Cowbell:
|
||||||
|
sounds[i] = "cowbell";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sounds;
|
||||||
|
}
|
||||||
|
public static void FourBeatCountIn(float beat, float length, int type)
|
||||||
|
{
|
||||||
|
string[] sounds = { "one", "two", "three", "four" };
|
||||||
|
sounds = GetCountInSounds(sounds, (CountInType)type);
|
||||||
|
|
||||||
|
MultiSound.Play(new MultiSound.Sound[]
|
||||||
|
{
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[0], beat),
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[1], beat + 1f * length),
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[2], beat + 2f * length),
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[3], beat + 3f * length)
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void EightBeatCountIn(float beat, float length, int type)
|
||||||
|
{
|
||||||
|
string[] sounds = { "one", "two", "one", "two", "three", "four" };
|
||||||
|
sounds = GetCountInSounds(sounds, (CountInType)type);
|
||||||
|
|
||||||
|
MultiSound.Play(new MultiSound.Sound[]
|
||||||
|
{
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[0], beat),
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[1], beat + 2f * length),
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[2], beat + 4f * length),
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[3], beat + 5f * length),
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[4], beat + 6f * length),
|
||||||
|
new MultiSound.Sound("count-ins/" + sounds[5], beat + 7f * length)
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Cowbell()
|
||||||
|
{
|
||||||
|
Jukebox.PlayOneShot("count-ins/cowbell");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Ready(float beat, float length)
|
||||||
|
{
|
||||||
|
MultiSound.Play(new MultiSound.Sound[]
|
||||||
|
{
|
||||||
|
new MultiSound.Sound("count-ins/ready1", beat),
|
||||||
|
new MultiSound.Sound("count-ins/ready2", beat + 1f * length),
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void And()
|
||||||
|
{
|
||||||
|
Jukebox.PlayOneShot("count-ins/and");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Go(bool alt)
|
||||||
|
{
|
||||||
|
string sound = "count-ins/go";
|
||||||
|
if (!alt)
|
||||||
|
sound += "1";
|
||||||
|
else
|
||||||
|
sound += "2";
|
||||||
|
Jukebox.PlayOneShot(sound);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
11
Assets/Scripts/SoundEffects.cs.meta
Normal file
11
Assets/Scripts/SoundEffects.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c2f8829b764160148b6dbf3947ea9df3
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in a new issue