newlon/scripts/components/level/RuntimeLevelData.cs

36 lines
776 B
C#

using Godot;
//using Godot.Collections;
using System;
public partial class RuntimeLevelData : Node
{
[Export]
public int SunCount { get; private set; } = 0;
public override void _Ready()
{
LevelController.Instance.LevelData = this;
}
public void AddSun(int amount)
{
SunCount += amount;
}
public void SpendSun(int amount)
{
SunCount -= amount;
}
public bool CheckSpendSun(int amount)
{
if (SunCount - amount < 0) return false;
return true;
}
//private Array<PlantResource> _selectedPlants;
//private bool _selected;
//public Array<PlantResource> GetSelectedPlants();
//public bool TrySelectPlants(Array<PlantResource>);
//public void ResetSelection();
}