.
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user