Performance Improvements (#173)

* improve performance with new render settings

- fix letterboxing losing camera references

* fin in missing params?

needs testing

* finish default param check

* scale jump animation of fan club spectators

* fix missing references in a karate man method

* more liberal use of Double in conductor

beatkeeping is now absolute instead of being additive

* optimize Conductor more

reduce caching from constantly sorting tempo changes despite game manager doing it for us
moved metronome logic to LateUpdate
This commit is contained in:
minenice55
2022-09-22 22:05:04 -04:00
committed by GitHub
parent af8dd6142e
commit 695f6671fb
26 changed files with 398 additions and 248 deletions

View File

@ -108,6 +108,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
{
if (clappingStartTime != Single.MinValue && cond.songPositionInBeats > clappingStartTime + 2f && !stopCharge)
{
animator.speed = 1f;
animator.Play("FanClapCharge", -1, 0);
stopCharge = true;
}
@ -120,6 +121,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
}
else
{
animator.speed = 1f;
animator.Play("FanFree", -1, 0);
stopBeat = false;
clappingStartTime = Single.MinValue;
@ -135,7 +137,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
float yWeight = -(yMul*yMul) + 1f;
motionRoot.transform.localPosition = new Vector3(0, 3f * yWeight);
shadow.transform.localScale = new Vector3((1f-yWeight*0.8f) * 1.4f, (1f-yWeight*0.8f) * 1.4f, 1f);
animator.Play("FanJump", -1, 0);
animator.DoScaledAnimation("FanJump", jumpStartTime);
}
else
{
@ -150,6 +152,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
stopBeat = false;
}
}
animator.speed = 1f;
hasJumped = false;
}
}
@ -165,6 +168,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
hasJumped = false;
stopBeat = true;
jumpStartTime = -99f;
animator.speed = 1f;
animator.Play("FanClap", -1, 0);
Jukebox.PlayOneShotGame("fanClub/play_clap");
Jukebox.PlayOneShotGame("fanClub/crap_impact");
@ -219,7 +223,10 @@ namespace HeavenStudio.Games.Scripts_FanClub
public void Bop()
{
if (!stopBeat)
{
animator.speed = 1f;
animator.Play("FanBeat");
}
}
public void ClapParticle()