fix: ticker behaviour working unexpectedly on instances where time increment is bigger than the period
This commit is contained in:
		@@ -20,13 +20,13 @@ public class TickerBehaviour : StopwatchBehaviour, ITicker
 | 
			
		||||
    {
 | 
			
		||||
        base.OnUpdate();
 | 
			
		||||
 | 
			
		||||
        if (Time < nextTick)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        while (Time > nextTick)
 | 
			
		||||
        {
 | 
			
		||||
            nextTick += Period;
 | 
			
		||||
            TickCounter++;
 | 
			
		||||
            OnTick?.Invoke(this);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected override void OnFinalize()
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user