This commit is contained in:
Rendo 2025-07-03 19:34:09 +05:00
commit b932e82555
39 changed files with 575 additions and 78 deletions

View file

@ -15,7 +15,7 @@ public partial class RuntimeLevelData : Node
}
[Export]
public int SunCount { get; private set; } = 0;
public float SunCount { get; private set; } = 0;
public event Action<LevelStates> OnLevelStateChanged;
public static RuntimeLevelData Instance { get; private set; }
@ -29,17 +29,17 @@ public partial class RuntimeLevelData : Node
}
#region Sun
public void AddSun(int amount)
public void AddSun(float amount)
{
SunCount += amount;
}
public void SpendSun(int amount)
public void SpendSun(float amount)
{
SunCount -= amount;
}
public bool CheckSpendSun(int amount)
public bool CheckSpendSun(float amount)
{
if (SunCount - amount < 0) return false;