S.A.P.S V0.4.0
A virtual reality stealth action game
 
Loading...
Searching...
No Matches
Leader Class Reference

A controller NPC that leads followers around in a group. More...

Inheritance diagram for Leader:
Crowd NPCPather

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.
 
- Public Member Functions inherited from NPCPather
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 ()
 
- Protected Member Functions inherited from Crowd
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 ()
 
- Protected Member Functions inherited from NPCPather
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

- Public Types inherited from NPCPather
enum  NPCState { Walk , Idle , Panic }
 
- Protected Attributes inherited from Crowd
float crowdPickChance = 0.4f
 
bool isLeading = false
 
bool isGoingToCrowd
 
CrowdPointAllocator crowd
 
int standingPoint
 
- Protected Attributes inherited from NPCPather
NavMeshAgent agent
 
Transform homeSpawnPoint
 
Transform goalPoint
 
float endSize = 0.5f
 
- Properties inherited from NPCPather
NPCState State [get, set]
 

Detailed Description

A controller NPC that leads followers around in a group.

Member Function Documentation

◆ ChangeDirection()

override void Leader.ChangeDirection ( )
protectedvirtual

Reimplemented from Crowd.

◆ CompletePath()

override void Leader.CompletePath ( )
protectedvirtual

Reimplemented from Crowd.

◆ FindCrowd()

override void Leader.FindCrowd ( List< GameObject > crowdPoints)
virtual

Attemps to find a crowd on spawn and path to a point within.

Parameters
crowdPointsPoints the npcs can choose from

Reimplemented from Crowd.

◆ LeaveCrowd()

override void Leader.LeaveCrowd ( )
protectedvirtual

Occurs after standing within a crowd and makes the NPC look for an exit to the scene.

Reimplemented from Crowd.

◆ SpawnFollowers()

void Leader.SpawnFollowers ( GameObject spawnable,
Transform parent,
CharacterCreator creator )

Spawns the followers before finding a crowd to path towards.

Parameters
spawnableReference to the NPC in Resources given by the NPCSpawner

◆ Start()

override void Leader.Start ( )
protectedvirtual

Reimplemented from Crowd.


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