Trick on the Class: prep bop entity

This commit is contained in:
minenice55
2022-04-11 09:56:37 -04:00
parent 27dd45148e
commit 995d20d522
4 changed files with 27 additions and 10 deletions

View File

@ -37,6 +37,7 @@ namespace HeavenStudio.Games
public BezierCurve3D shockTossCurve;
public static TrickClass instance;
public GameEvent bop = new GameEvent();
private void Awake()
{
@ -45,12 +46,27 @@ namespace HeavenStudio.Games
private void Update()
{
var cond = Conductor.instance;
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
{
if (cond.songPositionInBeats >= bop.startBeat && cond.songPositionInBeats < bop.startBeat + bop.length)
{
//TODO: bop animation
}
}
if (PlayerInput.Pressed())
{
PlayerDodge();
}
}
public void Bop(float beat, float length)
{
bop.startBeat = beat;
bop.length = length;
}
public void TossObject(float beat, int type)
{
switch (type)