Resource
namespace Griff.Modules.Strategy;
public sealed class Resource : ComponentSomething workers gather: a gold mine, a tree. Each trip takes a load away; when Amount runs out it’s gone. Give it a sprite and a collider (or a sprite alone) the size it covers; units walk around it.
This is a component: its saved properties are on its component page.
Properties
Section titled “Properties”Amount
Section titled “Amount”public int Amount { get; set; }How much is left.
Blocks
Section titled “Blocks”public bool Blocks { get; set; }Whether units walk around it. Untick it for something they can stand on.
public string? Kind { get; set; }What it gives, e.g. “Gold” or “Wood”: an item, the same as a pickup’s or an inventory’s (see Items).