A* Pathfinding Project  4.1.7
The A* Pathfinding Project for Unity 3D
Patrol Class Reference

Simple patrol behavior. More...

Detailed Description

Simple patrol behavior.

This will set the destination on the agent so that it moves through the sequence of objects in the targets array. Upon reaching a target it will wait for delay seconds.

See also
Pathfinding.AIDestinationSetter
Pathfinding.AIPath
Pathfinding.RichAI
Pathfinding.AILerp

Public Attributes

float delay = 0
 Time in seconds to wait at each target. More...
 
Transform [] targets
 Target points to move to in order. More...
 

Private Member Functions

void Awake ()
 
void Update ()
 Update is called once per frame. More...
 

Private Attributes

IAstarAI agent
 
int index
 Current target index. More...
 
float switchTime = float.PositiveInfinity
 

Member Function Documentation

◆ Awake()

void Awake ( )
private

◆ Update()

void Update ( )
private

Update is called once per frame.

Member Data Documentation

◆ agent

IAstarAI agent
private

◆ delay

float delay = 0

Time in seconds to wait at each target.

◆ index

int index
private

Current target index.

◆ switchTime

float switchTime = float.PositiveInfinity
private

◆ targets

Transform [] targets

Target points to move to in order.


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