Planeshift
|
Whenever an NPC is close to an location, this perception is passed to the npc. More...
#include <perceptions.h>
Public Member Functions | |
virtual bool | GetLocation (csVector3 &pos, iSector *§or) |
Get a location assosiated with the perception. More... | |
virtual float | GetRadius () const |
Get the radius of the perception. More... | |
LocationPerception (const char *n, const char *type, Location *location, iEngine *engine) | |
virtual Perception * | MakeCopy () |
Make a copy of this perception. More... | |
virtual | ~LocationPerception () |
Public Member Functions inherited from Perception | |
virtual void | ExecutePerception (NPC *npc, float weight) |
All preconditions has been checked, now excecute the perception. More... | |
virtual const csString & | GetName () const |
Get the name of the perception. More... | |
virtual gemNPCObject * | GetTarget () |
Some perception has a target/source. More... | |
const csString & | GetType () const |
Get the type of the perception. More... | |
Perception (const char *name) | |
Constructor. More... | |
Perception (const char *name, const char *type) | |
Constructor. More... | |
void | SetType (const char *type) |
Set the type of the perception. More... | |
virtual bool | ShouldReact (Reaction *reaction, NPC *npc) |
Check if this perception should react to a reaction. More... | |
virtual csString | ToString (NPC *npc) |
Get a text description of the perception. More... | |
virtual | ~Perception () |
Destructor. More... | |
Protected Attributes | |
Location * | location |
Protected Attributes inherited from Perception | |
csString | name |
The name of this perception. More... | |
csString | type |
Type used by perceptions. Usally they correspond to the same value in a reaction. More... | |
Whenever an NPC is close to an location, this perception is passed to the npc.
Definition at line 257 of file perceptions.h.
|
inline |
Definition at line 263 of file perceptions.h.
|
inlinevirtual |
Definition at line 265 of file perceptions.h.
|
virtual |
Get a location assosiated with the perception.
Some perception might hold a location. Default impl get location from target if there is one.
pos | The position of the location. |
sector | The sector of the location. |
Reimplemented from Perception.
|
virtual |
Get the radius of the perception.
Reimplemented from Perception.
|
virtual |
|
protected |
Definition at line 260 of file perceptions.h.