33 lines
713 B
C#
33 lines
713 B
C#
using Godot;
|
|
//using Godot.Collections;
|
|
using System;
|
|
|
|
public partial class RuntimeLevelData : Node
|
|
{
|
|
public int SunCount { get; private set; } = 0;
|
|
|
|
public override void _Ready()
|
|
{
|
|
LevelController.Instance.LevelData = this;
|
|
}
|
|
|
|
public void AddSun(int amount)
|
|
{
|
|
SunCount += amount;
|
|
}
|
|
|
|
public bool TrySpendSun(int amount)
|
|
{
|
|
if (SunCount - amount < 0) return false;
|
|
|
|
SunCount -= amount;
|
|
|
|
return true;
|
|
}
|
|
|
|
//private Array<PlantResource> _selectedPlants;
|
|
//private bool _selected;
|
|
//public Array<PlantResource> GetSelectedPlants();
|
|
//public bool TrySelectPlants(Array<PlantResource>);
|
|
//public void ResetSelection();
|
|
}
|