Class UnitMoveHandler
- Namespace
- StarterKit
- Assembly
- StarterKit.dll
STARTERKIT - Handles unit movement mode for UnitInfoUI. Extracted to keep UnitInfoUI focused on display concerns.
public class UnitMoveHandler
- Inheritance
-
objectUnitMoveHandler
Constructors
UnitMoveHandler(GameState, UnitSystem)
public UnitMoveHandler(GameState gameState, UnitSystem unitSystem)
Parameters
gameStateGameStateunitSystemUnitSystem
Fields
OnMoveComplete
public Action OnMoveComplete
Field Value
- Action
Properties
IsInMoveMode
public bool IsInMoveMode { get; }
Property Value
- bool
Methods
ExitMoveMode()
Exit move mode without executing a move.
public void ExitMoveMode()
HandleProvinceClick(ushort)
Handle a province click while in move mode. Returns true if the click was handled (move executed or cancelled).
public bool HandleProvinceClick(ushort targetProvinceID)
Parameters
targetProvinceIDushort
Returns
- bool
SetUIElements(Label, Button, Button, Button, Label)
Set UI element references for move mode display updates.
public void SetUIElements(Label header, Button createBtn, Button moveBtn, Button cancelBtn, Label moveLabel)
Parameters
TryEnterMoveMode(ushort)
Enter move mode for units in the specified province.
public bool TryEnterMoveMode(ushort sourceProvinceID)
Parameters
sourceProvinceIDushort
Returns
- bool