recolourable shadows

- rework now has parity with the old version
This commit is contained in:
minenice55
2022-08-03 18:55:13 -04:00
parent 35ff6bdd45
commit 86c0e7eb0a
10 changed files with 1213 additions and 546 deletions

View File

@ -12,6 +12,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
{
public Animator anim;
public GameEvent bop = new GameEvent();
public SpriteRenderer[] Shadows;
float lastPunchTime = Single.MinValue;
float lastComboMissTime = Single.MinValue;
@ -41,6 +42,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
var cond = Conductor.instance;
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1, false) && cond.songPositionInBeats > bop.startBeat && !inCombo)
{
anim.speed = 1f;
anim.Play("Beat", -1, 0);
}
@ -244,5 +246,13 @@ namespace HeavenStudio.Games.Scripts_KarateMan
anim.DoScaledAnimationAsync("ManKick", 0.5f);
}
public void UpdateShadowColour()
{
foreach (var shadow in Shadows)
{
shadow.color = KarateMan.instance.GetShadowColor();
}
}
}
}