refactor: timer methods names cleaned up
This commit is contained in:
@@ -17,7 +17,7 @@ public class StopwatchBehaviour : Behaviour, IStopwatch
|
||||
private bool shouldBeTicking = false;
|
||||
private bool hasStartedTickingBefore = false;
|
||||
|
||||
public virtual void StopwatchStart()
|
||||
public virtual void Start()
|
||||
{
|
||||
Time = 0f;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class StopwatchBehaviour : Behaviour, IStopwatch
|
||||
StartStopwatch();
|
||||
}
|
||||
|
||||
public virtual void StopwatchStop()
|
||||
public virtual void Stop()
|
||||
{
|
||||
if (!shouldBeTicking)
|
||||
return;
|
||||
@@ -56,7 +56,7 @@ public class StopwatchBehaviour : Behaviour, IStopwatch
|
||||
return;
|
||||
|
||||
if (hasStartedTickingBefore)
|
||||
StopwatchResume();
|
||||
Resume();
|
||||
else
|
||||
StartStopwatch();
|
||||
}
|
||||
@@ -66,16 +66,16 @@ public class StopwatchBehaviour : Behaviour, IStopwatch
|
||||
if (!shouldBeTicking || State is not TimerState.Ticking)
|
||||
return;
|
||||
|
||||
StopwatchPause();
|
||||
Pause();
|
||||
}
|
||||
|
||||
public virtual void StopwatchPause()
|
||||
public virtual void Pause()
|
||||
{
|
||||
State = TimerState.Paused;
|
||||
OnPaused?.Invoke(this);
|
||||
}
|
||||
|
||||
public virtual void StopwatchResume()
|
||||
public virtual void Resume()
|
||||
{
|
||||
State = TimerState.Ticking;
|
||||
OnResumed?.Invoke(this);
|
||||
|
||||
Reference in New Issue
Block a user