refactor: timer methods names cleaned up
This commit is contained in:
@@ -4,16 +4,16 @@ public class TickerBehaviour : StopwatchBehaviour, ITicker
|
||||
{
|
||||
public event ITicker.TickerTickEventHandler? OnTick = null;
|
||||
|
||||
public double TickPeriod { get; set; } = 1f;
|
||||
public double Period { get; set; } = 1f;
|
||||
public int TickCounter { get; private set; } = 0;
|
||||
|
||||
private double nextTick = 0f;
|
||||
|
||||
public override void StopwatchStart()
|
||||
public override void Start()
|
||||
{
|
||||
TickCounter = 0;
|
||||
base.StopwatchStart();
|
||||
nextTick = Time + TickPeriod;
|
||||
base.Start();
|
||||
nextTick = Time + Period;
|
||||
}
|
||||
|
||||
protected override void OnUpdate()
|
||||
@@ -23,7 +23,7 @@ public class TickerBehaviour : StopwatchBehaviour, ITicker
|
||||
if (Time < nextTick)
|
||||
return;
|
||||
|
||||
nextTick += TickPeriod;
|
||||
nextTick += Period;
|
||||
TickCounter++;
|
||||
OnTick?.Invoke(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user