A dummy NPC that follows commands given by a leader. More...
Public Member Functions | |
void | FollowLeader (GameObject leader, Transform homePos) |
Attaches the leader to the follower. Acts as a Constructor method but allows the leader to be passed in as leader | |
void | GoToExitScene (Transform point) |
Tells the follower to exit the scene. Assumes the point given is a edge point where they can despawn appropriately. | |
void | GoToStandingPoint (Transform point) |
Tells the follower to stand in a crowd point. | |
![]() | |
void | SetGoalAndHome (Transform goal, Transform home) |
Recieves and sets the goal position and home position. | |
void | RemoveCoherency () |
This method removes the NPC from the players coherency zone. | |
void | DestroySelf () |
Public Attributes | |
bool | inCrowd |
Protected Member Functions | |
override void | Update () |
override void | CompletePath () |
![]() | |
virtual void | Awake () |
void | SetNewGoal (Transform newGoal) |
Begins the NPC's path to the goal given. | |
Transform | GetNewRandomGoal () |
void | CheckDistance () |
virtual void | Panic () |
Additional Inherited Members | |
![]() | |
enum | NPCState { Walk , Idle , Panic } |
![]() | |
NavMeshAgent | agent |
Transform | homeSpawnPoint |
Transform | goalPoint |
float | endSize = 0.5f |
![]() | |
NPCState | State [get, set] |
A dummy NPC that follows commands given by a leader.
|
protectedvirtual |
Reimplemented from NPCPather.
void Follower.FollowLeader | ( | GameObject | leader, |
Transform | homePos ) |
Attaches the leader to the follower. Acts as a Constructor method but allows the leader to be passed in as leader
leader |
void Follower.GoToExitScene | ( | Transform | point | ) |
Tells the follower to exit the scene. Assumes the point given is a edge point where they can despawn appropriately.
point |
void Follower.GoToStandingPoint | ( | Transform | point | ) |
Tells the follower to stand in a crowd point.
point |
|
protectedvirtual |
Reimplemented from NPCPather.
bool Follower.inCrowd |