(Feat) Add build cost

This commit is contained in:
2026-07-14 14:25:02 +02:00
parent c9e923975d
commit 3657b870d8
27 changed files with 1270 additions and 990 deletions
@@ -0,0 +1,26 @@
using UnityEngine;
namespace Ashwild.Building
{
/// <summary>
/// Lightweight, data-agnostic view payload for one line of a build's cost, handed to the crosshair
/// so it can render the price without ever touching BuildableData/ItemData. Carries the icon, how
/// many the local player currently holds, the required amount, and whether the line is affordable —
/// the manager decides the numbers, the view just renders "owned / required" and colours it.
/// </summary>
public readonly struct BuildCostView
{
public readonly Sprite Icon;
public readonly int Owned;
public readonly int Amount;
public readonly bool Affordable;
public BuildCostView(Sprite icon, int owned, int amount, bool affordable)
{
Icon = icon;
Owned = owned;
Amount = amount;
Affordable = affordable;
}
}
}