A* Pathfinding Project  4.1.14
The A* Pathfinding Project for Unity 3D
TurnBasedManager Class Reference

Helper script in the example scene 'Turn Based'. More...

Detailed Description

Helper script in the example scene 'Turn Based'.

Public Types

enum  State { SelectUnit, SelectTarget, Move }
 

Public Attributes

LayerMask layerMask
 
float movementSpeed
 
GameObject nodePrefab
 
State state = State.SelectUnit
 

Private Member Functions

void Awake ()
 
void DestroyPossibleMoves ()
 
void GeneratePossibleMoves (TurnBasedAI unit)
 
GetByRay< T > (Ray ray)
 
void HandleButtonUnderRay (Ray ray)
 
IEnumerator MoveToNode (TurnBasedAI unit, GraphNode node)
 
void Select (TurnBasedAI unit)
 
void Update ()
 

Static Private Member Functions

static IEnumerator MoveAlongPath (TurnBasedAI unit, ABPath path, float speed)
 Interpolates the unit along the path. More...
 

Private Attributes

EventSystem eventSystem
 
List< GameObject > possibleMoves = new List<GameObject>()
 
TurnBasedAI selected
 

Member Enumeration Documentation

◆ State

enum State
strong
Enumerator
SelectUnit 
SelectTarget 
Move 

Member Function Documentation

◆ Awake()

void Awake ( )
private

◆ DestroyPossibleMoves()

void DestroyPossibleMoves ( )
private

◆ GeneratePossibleMoves()

void GeneratePossibleMoves ( TurnBasedAI  unit)
private

◆ GetByRay< T >()

T GetByRay< T > ( Ray  ray)
private
Type Constraints
T :class 

◆ HandleButtonUnderRay()

void HandleButtonUnderRay ( Ray  ray)
private

◆ MoveAlongPath()

static IEnumerator MoveAlongPath ( TurnBasedAI  unit,
ABPath  path,
float  speed 
)
staticprivate

Interpolates the unit along the path.

◆ MoveToNode()

IEnumerator MoveToNode ( TurnBasedAI  unit,
GraphNode  node 
)
private

◆ Select()

void Select ( TurnBasedAI  unit)
private

◆ Update()

void Update ( )
private

Member Data Documentation

◆ eventSystem

EventSystem eventSystem
private

◆ layerMask

LayerMask layerMask

◆ movementSpeed

float movementSpeed

◆ nodePrefab

GameObject nodePrefab

◆ possibleMoves

List<GameObject> possibleMoves = new List<GameObject>()
private

◆ selected

TurnBasedAI selected
private

◆ state


The documentation for this class was generated from the following file: