mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 02:57:38 +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:
@ -55,7 +55,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
|
||||
|
||||
void Just(PlayerActionEvent caller, float state)
|
||||
{
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 3f, delegate
|
||||
{
|
||||
|
@ -187,7 +187,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 { SingleBop(); })
|
||||
});
|
||||
@ -220,7 +220,7 @@ namespace HeavenStudio.Games
|
||||
else if (weaselsHappy) weasels.Happy();
|
||||
if (!forceNoLeaves)
|
||||
{
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 1f, delegate
|
||||
{
|
||||
@ -321,7 +321,7 @@ namespace HeavenStudio.Games
|
||||
if (hit)
|
||||
{
|
||||
lastHitWeasel = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat - (0.25f/3f), delegate { weasels.Hit(beat); }),
|
||||
});
|
||||
@ -329,7 +329,7 @@ namespace HeavenStudio.Games
|
||||
else
|
||||
{
|
||||
lastHitWeasel = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 0.25, delegate { weasels.Hide(beat + 0.25f); }),
|
||||
});
|
||||
|
@ -48,7 +48,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
|
||||
{
|
||||
notHit = false;
|
||||
anim.DoScaledAnimationAsync("WeaselsHide", 0.5f);
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 1.45f, delegate
|
||||
{
|
||||
@ -75,7 +75,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
|
||||
{
|
||||
notHit = false;
|
||||
anim.DoScaledAnimationAsync("WeaselsHit", 0.5f);
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 2f, delegate
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
|
||||
SoundByte.PlayOneShot("miss");
|
||||
game.Kick(false);
|
||||
GetComponent<SpriteRenderer>().sortingOrder = 8;
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 4f, delegate
|
||||
{
|
||||
@ -73,7 +73,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
|
||||
return;
|
||||
}
|
||||
Hit();
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 1f, delegate
|
||||
{
|
||||
@ -115,7 +115,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
|
||||
}
|
||||
}
|
||||
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 5f, delegate
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
|
||||
|
||||
void Just(PlayerActionEvent caller, float state)
|
||||
{
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 3f, delegate
|
||||
{
|
||||
@ -89,7 +89,7 @@ namespace HeavenStudio.Games.Scripts_DoubleDate
|
||||
SoundByte.PlayOneShotGame("doubleDate/weasel_hide");
|
||||
game.MissKick(pathStartBeat + 2.25f);
|
||||
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
BeatAction.New(this, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(conductor.songPositionInBeatsAsDouble + 4f, delegate
|
||||
{
|
||||
|
Reference in New Issue
Block a user