Almanach
This commit is contained in:
parent
008fa31dd4
commit
b932e82555
39 changed files with 575 additions and 78 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue