A controller NPC that leads followers around in a group. More...
Public Member Functions | |
void | SpawnFollowers (GameObject spawnable, Transform parent, CharacterCreator creator) |
Spawns the followers before finding a crowd to path towards. | |
override void | FindCrowd (List< GameObject > crowdPoints) |
Attemps to find a crowd on spawn and path to a point within. | |
![]() | |
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 () |
Protected Member Functions | |
override void | Start () |
override void | LeaveCrowd () |
Occurs after standing within a crowd and makes the NPC look for an exit to the scene. | |
override void | ChangeDirection () |
override void | CompletePath () |
![]() | |
void | SetNewRandomCrowd () |
CrowdPointAllocator | RollCrowd (List< GameObject > crowdPoints) |
Returns a random crowd from the list of crowd points in the scene. | |
void | ResetRandomDirection () |
override void | Panic () |
![]() | |
virtual void | Awake () |
virtual void | Update () |
void | SetNewGoal (Transform newGoal) |
Begins the NPC's path to the goal given. | |
Transform | GetNewRandomGoal () |
void | CheckDistance () |
Additional Inherited Members | |
![]() | |
enum | NPCState { Walk , Idle , Panic } |
![]() | |
float | crowdPickChance = 0.4f |
bool | isLeading = false |
bool | isGoingToCrowd |
CrowdPointAllocator | crowd |
int | standingPoint |
![]() | |
NavMeshAgent | agent |
Transform | homeSpawnPoint |
Transform | goalPoint |
float | endSize = 0.5f |
![]() | |
NPCState | State [get, set] |
A controller NPC that leads followers around in a group.
|
protectedvirtual |
Reimplemented from Crowd.
|
protectedvirtual |
Reimplemented from Crowd.
|
virtual |
Attemps to find a crowd on spawn and path to a point within.
crowdPoints | Points the npcs can choose from |
Reimplemented from Crowd.
|
protectedvirtual |
Occurs after standing within a crowd and makes the NPC look for an exit to the scene.
Reimplemented from Crowd.
void Leader.SpawnFollowers | ( | GameObject | spawnable, |
Transform | parent, | ||
CharacterCreator | creator ) |
Spawns the followers before finding a crowd to path towards.
spawnable | Reference to the NPC in Resources given by the NPCSpawner |
|
protectedvirtual |
Reimplemented from Crowd.