This commit is contained in:
redglow
2026-07-21 20:49:24 +02:00
parent c540b99eb6
commit e7dbb9cabb
31 changed files with 394 additions and 76 deletions
+11 -2
View File
@@ -1,13 +1,22 @@
using GodotHostTest.Interfaces;
using R3;
namespace GodotHostTest.Game.Level;
public class CurrentLevel : ICurrentLevel
{
public int LevelNumber { get; private set; } = 1;
private readonly ReactiveProperty<int> _levelNumber;
public CurrentLevel()
{
_levelNumber = new ReactiveProperty<int>(1);
LevelNumber = _levelNumber.ToReadOnlyReactiveProperty();
}
public ReadOnlyReactiveProperty<int> LevelNumber { get; }
public void NextLevel()
{
LevelNumber++;
_levelNumber.Value++;
}
}