Class UnitPathRenderer
ENGINE (Map Layer) - Renders movement path lines for units.
Simple LineRenderer-based visualization for unit movement paths. Subscribes to Core movement events and draws paths using ProvinceCenterLookup.
Can be disabled/replaced by GAME layer if custom visualization is needed.
public class UnitPathRenderer : MonoBehaviour
- Inheritance
-
objectUnitPathRenderer
Properties
ActivePathCount
Get count of active path lines.
public int ActivePathCount { get; }
Property Value
- int
IsInitialized
public bool IsInitialized { get; }
Property Value
- bool
Methods
GetCountryColor(ushort)
Get color for a country (simple hue-based). Override in subclass or use SetCountryColorProvider for custom colors.
protected virtual Color GetCountryColor(ushort countryID)
Parameters
countryIDushort
Returns
Initialize(GameState, ProvinceMapping, Transform, int, int)
Alternative initialization with ProvinceMapping (creates its own ProvinceCenterLookup).
public void Initialize(GameState gameState, ProvinceMapping provinceMapping, Transform meshTransform, int texWidth, int texHeight)
Parameters
gameStateGameStateprovinceMappingProvinceMappingmeshTransformTransformtexWidthinttexHeightint
Initialize(GameState, ProvinceCenterLookup)
Initialize the path renderer.
public void Initialize(GameState gameState, ProvinceCenterLookup centerLookup)
Parameters
gameStateGameStatecenterLookupProvinceCenterLookup
SetEnabled(bool)
Enable or disable path rendering at runtime.
public void SetEnabled(bool enabled)
Parameters
enabledbool