22 lines
473 B
C#
22 lines
473 B
C#
using GodotHostTest.Interfaces;
|
|
using R3;
|
|
|
|
namespace GodotHostTest.Game.Level;
|
|
|
|
public class CurrentLevel : ICurrentLevel
|
|
{
|
|
private readonly ReactiveProperty<int> _levelNumber;
|
|
|
|
public CurrentLevel()
|
|
{
|
|
_levelNumber = new ReactiveProperty<int>(1);
|
|
LevelNumber = _levelNumber.ToReadOnlyReactiveProperty();
|
|
}
|
|
|
|
public ReadOnlyReactiveProperty<int> LevelNumber { get; }
|
|
|
|
public void NextLevel()
|
|
{
|
|
_levelNumber.Value++;
|
|
}
|
|
} |