refactor: timer methods names cleaned up

This commit is contained in:
2025-04-06 17:26:57 +03:00
parent 98c9dde98a
commit 6f425776cc
6 changed files with 27 additions and 27 deletions

View File

@@ -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);