mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 14:27:37 +02:00
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:
@ -235,7 +235,7 @@ namespace HeavenStudio.Games
|
||||
SoundByte.PlayOneShotGame($"ringside/yell{UnityEngine.Random.Range(1, 7)}Raw");
|
||||
SoundByte.PlayOneShotGame("ringside/barely");
|
||||
wrestlerTransform.localScale = new Vector3(1.1f, 1.1f, 1f);
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(cond.songPositionInBeatsAsDouble + 0.1f, delegate { wrestlerTransform.localScale = new Vector3(1f, 1f, 1f); }),
|
||||
});
|
||||
@ -301,7 +301,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + i, delegate
|
||||
{
|
||||
@ -376,7 +376,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
int currentQuestion = questionVariant;
|
||||
if (currentQuestion == (int)QuestionVariant.Random) currentQuestion = UnityEngine.Random.Range(1, 4);
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat - 0.5f, delegate { reporterAnim.DoScaledAnimationAsync("WubbaLubbaDubbaThatTrue", 0.4f); }),
|
||||
});
|
||||
@ -392,7 +392,7 @@ namespace HeavenStudio.Games
|
||||
new MultiSound.Sound($"ringside/true{currentQuestion}", beat + 1f),
|
||||
}, forcePlay: true);
|
||||
ScheduleInput(beat, 2f, InputType.STANDARD_DOWN, JustQuestion, Miss, Nothing);
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 0.5f, delegate { reporterAnim.DoScaledAnimationAsync("ThatTrue", 0.5f); }),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { canBop = false; }),
|
||||
@ -418,7 +418,7 @@ namespace HeavenStudio.Games
|
||||
|
||||
ScheduleInput(beat, 2.5f, InputType.STANDARD_DOWN, JustBigGuyFirst, MissBigGuyOne, Nothing);
|
||||
ScheduleInput(beat, 3f, InputType.STANDARD_DOWN, JustBigGuySecond, MissBigGuyTwo, Nothing);
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 2f, delegate { reporterAnim.Play("True", 0, 0); }),
|
||||
new BeatAction.Action(beat + 2.25f, delegate { canBop = false; }),
|
||||
@ -464,7 +464,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
reporterShouldHeart = false;
|
||||
}
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate
|
||||
{
|
||||
@ -496,7 +496,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
if (newspaperBeats > 0)
|
||||
{
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 3f, delegate
|
||||
{
|
||||
@ -540,7 +540,7 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
else
|
||||
{
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 3.99f, delegate
|
||||
{
|
||||
@ -553,7 +553,7 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
else
|
||||
{
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 2.5f, delegate
|
||||
{
|
||||
@ -563,7 +563,7 @@ namespace HeavenStudio.Games
|
||||
});
|
||||
if (newspaperBeats > 0)
|
||||
{
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 3f, delegate
|
||||
{
|
||||
@ -684,7 +684,7 @@ namespace HeavenStudio.Games
|
||||
SoundByte.PlayOneShotGame($"ringside/cough");
|
||||
reporterAnim.Play("ExtendMiss", 0, 0);
|
||||
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
|
||||
@ -699,7 +699,7 @@ namespace HeavenStudio.Games
|
||||
wrestlerAnim.DoScaledAnimationAsync("Ye", 0.5f);
|
||||
reporterAnim.Play("ExtendSmile", 0, 0);
|
||||
SoundByte.PlayOneShotGame($"ringside/ye{UnityEngine.Random.Range(1, 4)}");
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { SoundByte.PlayOneShotGame("ringside/yeCamera"); }),
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { FadeFlashColor(Color.white, new Color(1, 1, 1, 0), 0.5f); }),
|
||||
@ -737,7 +737,7 @@ namespace HeavenStudio.Games
|
||||
wrestlerAnim.DoScaledAnimationAsync("BigGuyTwo", 0.5f);
|
||||
if (!missedBigGuy)
|
||||
{
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
|
||||
});
|
||||
@ -746,7 +746,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
reporterAnim.Play("ExtendMiss", 0, 0);
|
||||
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
|
||||
@ -764,7 +764,7 @@ namespace HeavenStudio.Games
|
||||
if (!missedBigGuy)
|
||||
{
|
||||
reporterAnim.Play("ExtendSmile", 0, 0);
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { SoundByte.PlayOneShotGame("ringside/musclesCamera"); }),
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("SmileReporter", 0, 0); }),
|
||||
@ -777,7 +777,7 @@ namespace HeavenStudio.Games
|
||||
else
|
||||
{
|
||||
reporterAnim.Play("ExtendMiss", 0, 0);
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
|
||||
@ -796,7 +796,7 @@ namespace HeavenStudio.Games
|
||||
SoundByte.PlayOneShotGame($"ringside/yell{UnityEngine.Random.Range(1, 7)}Raw");
|
||||
reporterAnim.Play("IdleMiss", 0, 0);
|
||||
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.1f, delegate { wrestlerTransform.localScale = new Vector3(1f, 1f, 1f); }),
|
||||
});
|
||||
@ -824,7 +824,7 @@ namespace HeavenStudio.Games
|
||||
FadeFlashColor(Color.white, new Color(1, 1, 1, 0), 1f);
|
||||
FadeBGColor(Color.black, defaultBGColorLight, 1f);
|
||||
flashParticles.Play();
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.1f, delegate { wrestlerTransform.localScale = new Vector3(1f, 1f, 1f); }),
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 1f, delegate { SoundByte.PlayOneShotGame("ringside/poseCamera"); }),
|
||||
@ -838,7 +838,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
reporterAnim.Play("ExtendMiss", 0, 0);
|
||||
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
|
||||
@ -854,7 +854,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
reporterAnim.Play("ExtendMiss", 0, 0);
|
||||
SoundByte.PlayOneShotGame($"ringside/huhaudience{UnityEngine.Random.Range(0, 2)}");
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.5f, delegate { reporterAnim.Play("IdleMiss", 0, 0); }),
|
||||
new BeatAction.Action(caller.startBeat + caller.timer + 0.9f, delegate { reporterAnim.Play("IdleReporter", 0, 0); }),
|
||||
|
Reference in New Issue
Block a user