void FixedUpdate()
{
if (IsRunning)
{
if (curCount > 0.0f)
{
curCount -= Time.fixedDeltaTime;
StepEvent?.Invoke(curCount);
if (lastIntCount > Mathf.CeilToInt(curCount))
{
lastIntCount = Mathf.CeilToInt(curCount);
WholeStepEvent?.Invoke(lastIntCount);
}
}
else
{
curCount = 0.0f;
IsRunning = false;
FinishedEvent?.Invoke();
}
UpdateText();
}
}