Timekeeping Improvements and Small Optimizations (#544)

* make BeatActions coroutines instead of componentrs

* pooled scheduled sounds

implement S' entity seek

* remove debug prints from last two changes

* implement absolute time tracking

implement DSP time resyncing

* optimize GameManager

* update TMPro

* update IDE packages

* fix dsp sync making the drift worse

* fix issue with the JSL dll

* relocate debug print

* make scheduled pitch setter functional

* any cpu
This commit is contained in:
minenice55
2023-09-11 18:28:04 -04:00
committed by GitHub
parent 0acaafbebd
commit 60d29f19c6
157 changed files with 49650 additions and 2194 deletions

View File

@ -60,7 +60,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/rocket_note", beat + 2, pitches[2]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -86,7 +86,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/popper_note", beat + 1.66f, pitches[4]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -116,7 +116,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/bell_short", beat + 1.83f, pitches[6]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -154,7 +154,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/flute", beat + 1.83f, pitches[12]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
@ -171,7 +171,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
{
number.SetActive(false);
anim.SetBool("CanRise", false);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -185,7 +185,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
SoundByte.PlayOneShotGame("launchParty/rocket_endBad");
string leftOrRight = (UnityEngine.Random.Range(1, 3) == 1) ? "Left" : "Right";
anim.Play("RocketBarely" + leftOrRight, 0, 0);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -203,7 +203,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/rocket_note", caller.startBeat + caller.timer, pitches[3]),
new MultiSound.Sound("launchParty/rocket_family", caller.startBeat + caller.timer),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer, delegate { numberAnim.DoScaledAnimationAsync("CountImpact", 0.5f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
@ -217,7 +217,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
{
number.SetActive(false);
anim.SetBool("CanRise", false);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -229,7 +229,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
anim.Play("RocketBarely" + leftOrRight, 0, 0);
SoundByte.PlayOneShotGame("launchParty/miss");
SoundByte.PlayOneShotGame("launchParty/rocket_endBad");
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -247,7 +247,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/popper_note", caller.startBeat + caller.timer, pitches[5]),
new MultiSound.Sound("launchParty/rocket_crackerblast", caller.startBeat + caller.timer),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer, delegate { numberAnim.DoScaledAnimationAsync("CountImpact", 0.5f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
@ -261,7 +261,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
{
number.SetActive(false);
anim.SetBool("CanRise", false);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -273,7 +273,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
anim.Play("RocketBarely" + leftOrRight, 0, 0);
SoundByte.PlayOneShotGame("launchParty/miss");
SoundByte.PlayOneShotGame("launchParty/rocket_endBad");
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -291,7 +291,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/bell_note", caller.startBeat + caller.timer, pitches[7]),
new MultiSound.Sound("launchParty/bell_blast", caller.startBeat + caller.timer, pitches[8]),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer, delegate { numberAnim.DoScaledAnimationAsync("CountImpact", 0.5f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
@ -305,7 +305,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
{
number.SetActive(false);
anim.SetBool("CanRise", false);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -317,7 +317,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
anim.Play("RocketBarely" + leftOrRight, 0, 0);
SoundByte.PlayOneShotGame("launchParty/miss");
SoundByte.PlayOneShotGame("launchParty/rocket_endBad");
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});
@ -336,7 +336,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
new MultiSound.Sound("launchParty/pin", caller.startBeat + caller.timer, pitches[14]),
new MultiSound.Sound("launchParty/rocket_bowling", caller.startBeat + caller.timer),
}, forcePlay: true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer, delegate { numberAnim.DoScaledAnimationAsync("CountImpact", 0.5f); }),
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
@ -349,7 +349,7 @@ namespace HeavenStudio.Games.Scripts_LaunchParty
SoundByte.PlayOneShotGame("launchParty/miss");
number.SetActive(false);
anim.Play("RocketMiss", 0, 0);
BeatAction.New(gameObject, new List<BeatAction.Action>()
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { GameObject.Destroy(gameObject); }),
});