// Assets/_Project/Scripts/Gameplay/ISelectable.cs
using UnityEngine;
namespace TD.Gameplay
{
///
/// Categorizes the kind of selectable object so HUD can decide which command
/// buttons (tower-build vs upgrade/sell vs none) to show without doing
/// type-tests against every concrete component.
///
public enum SelectableKind
{
Builder,
Tower,
Enemy,
BuildSite, // tower in queued / constructing / paused / shelved state
}
///
/// Anything the local player can click to select. Implementers expose a
/// display name for the HUD portrait, a kind for context-aware UI, and the
/// position + size hints the needs to draw
/// the selection ring.
///
///
/// Selection is a local UI concept — implementers don't need to be
/// NetworkBehaviours (though Builder and TowerInstance happen to be).
///
public interface ISelectable
{
string DisplayName { get; }
SelectableKind Kind { get; }
/// Transform whose XZ position the scene-wide selection ring
/// follows. The visualizer projects Y to the buildable plane regardless
/// of where this transform sits, so implementers can simply return
/// this.transform.
Transform SelectionTransform { get; }
/// Half-width of the selection ring in world units. The visualizer
/// scales its base 1-unit-diameter ring mesh to 2 * SelectionRadius.
/// Computed on every selection change, so implementers may derive it from
/// runtime state (e.g., tower footprint, collider bounds).
float SelectionRadius { get; }
}
}