(Feat) Add build cost
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user