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

Generates the path the NPCs take and handles cleanup of NPCs once finished. More...

Inheritance diagram for NPCPather:
Crowd Follower Passerby Leader Target

Public Types

enum  NPCState { Walk , Idle , Panic }
 

Public Member Functions

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

virtual void Awake ()
 
virtual void Update ()
 
void SetNewGoal (Transform newGoal)
 Begins the NPC's path to the goal given.
 
Transform GetNewRandomGoal ()
 
void CheckDistance ()
 
virtual void CompletePath ()
 
virtual void Panic ()
 

Protected Attributes

NavMeshAgent agent
 
Transform homeSpawnPoint
 
Transform goalPoint
 
float endSize = 0.5f
 

Properties

NPCState State [get, set]
 

Detailed Description

Generates the path the NPCs take and handles cleanup of NPCs once finished.

Member Enumeration Documentation

◆ NPCState

Enumerator
Walk 
Idle 
Panic 

Member Function Documentation

◆ Awake()

virtual void NPCPather.Awake ( )
protectedvirtual

◆ CheckDistance()

void NPCPather.CheckDistance ( )
protected

◆ CompletePath()

virtual void NPCPather.CompletePath ( )
protectedvirtual

Reimplemented in Crowd, Follower, Leader, and Target.

◆ DestroySelf()

void NPCPather.DestroySelf ( )

◆ GetNewRandomGoal()

Transform NPCPather.GetNewRandomGoal ( )
protected

◆ Panic()

virtual void NPCPather.Panic ( )
protectedvirtual

Reimplemented in Crowd.

◆ RemoveCoherency()

void NPCPather.RemoveCoherency ( )

This method removes the NPC from the players coherency zone.

◆ SetGoalAndHome()

void NPCPather.SetGoalAndHome ( Transform goal,
Transform home )

Recieves and sets the goal position and home position.

Parameters
goal
home

◆ SetNewGoal()

void NPCPather.SetNewGoal ( Transform newGoal)
protected

Begins the NPC's path to the goal given.

Parameters
newGoal

◆ Update()

virtual void NPCPather.Update ( )
protectedvirtual

Reimplemented in Follower.

Member Data Documentation

◆ agent

NavMeshAgent NPCPather.agent
protected

◆ endSize

float NPCPather.endSize = 0.5f
protected

◆ goalPoint

Transform NPCPather.goalPoint
protected

◆ homeSpawnPoint

Transform NPCPather.homeSpawnPoint
protected

Property Documentation

◆ State

NPCState NPCPather.State
getset

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