End Pose Start
Adds the End Pose cue's tweeting sound (took so long but felt so cool)
This commit is contained in:
parent
75f8ad0184
commit
40d722de01
|
|
@ -12,6 +12,12 @@ namespace HeavenStudio.Games.Loaders
|
|||
{
|
||||
return new Minigame("sumoBrothers", "Sumo Brothers \n<color=#eb5454>[INITIALIZATION ONLY]</color>", "0058CE", false, false, new List<GameAction>()
|
||||
{
|
||||
new GameAction("endPose", "End Pose")
|
||||
{
|
||||
preFunction = delegate { var e = eventCaller.currentEntity; SumoBrothers.Pose(e.beat); },
|
||||
defaultLength = 5f
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +25,7 @@ namespace HeavenStudio.Games.Loaders
|
|||
|
||||
namespace HeavenStudio.Games
|
||||
{
|
||||
// using Scripts_SumoBrothers;
|
||||
// using Scripts_SumoBrothers;
|
||||
public class SumoBrothers : Minigame
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
|
|
@ -32,6 +38,30 @@ namespace HeavenStudio.Games
|
|||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static void Pose(float beat)
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
var cueLength = 60 / cond.songBpm * 3;
|
||||
var loopAmount = Math.Ceiling((cueLength - 0.208) / 0.395);
|
||||
var beatsPerSecond = cond.songBpm / 60;
|
||||
var soundBeatLength = beatsPerSecond * 0.395;
|
||||
|
||||
print(cueLength + " and " + loopAmount);
|
||||
|
||||
List<MultiSound.Sound> sound = new List<MultiSound.Sound>();
|
||||
sound.Add(new MultiSound.Sound("sumoBrothers/posesignalBegin", beat));
|
||||
|
||||
for (int i = 1; i <= loopAmount; i++)
|
||||
{
|
||||
sound.Add(new MultiSound.Sound("sumoBrothers/posesignalLoop", i * (float)soundBeatLength + beat - (float)soundBeatLength + ((float)beatsPerSecond * 0.208f)));
|
||||
}
|
||||
print(sound.ToArray());
|
||||
MultiSound.Play(sound.ToArray());
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue