pause now is not mandatory
This commit is contained in:
parent
f65cb11474
commit
5d4ae478dc
7 changed files with 31 additions and 8 deletions
17
scripts/level/GameTimer.cs
Normal file
17
scripts/level/GameTimer.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using Godot;
|
||||
using Newlon.Components.Level;
|
||||
|
||||
public partial class GameTimer : Timer
|
||||
{
|
||||
public void OnLevelStateChanged(RuntimeLevelData.LevelStates state)
|
||||
{
|
||||
if (state == RuntimeLevelData.LevelStates.Game)
|
||||
{
|
||||
Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue