Planeshift
|
Given to the NPC upon ever tick of game minute. More...
#include <perceptions.h>
Public Member Functions | |
virtual Perception * | MakeCopy () |
Make a copy of this perception. | |
virtual bool | ShouldReact (Reaction *reaction, NPC *npc) |
Check if this perception should react to a reaction. | |
TimePerception (int hour, int minute, int year, int month, int day) | |
virtual csString | ToString (NPC *npc) |
Get a text description of the perception. | |
virtual | ~TimePerception () |
Static Public Member Functions | |
static void | NormalizeReaction (Reaction *reaction) |
Called from Reaction for time types to normalize the values used. | |
Protected Attributes | |
int | gameDay |
int | gameHour |
int | gameMinute |
int | gameMonth |
int | gameYear |
Given to the NPC upon ever tick of game minute.
Perception to allow reaction based on time. Any combination of hours,minutes,years,months,days can be matched.
Definition at line 183 of file perceptions.h.
Definition at line 189 of file perceptions.h.
virtual TimePerception::~TimePerception | ( | ) | [inline, virtual] |
Definition at line 191 of file perceptions.h.
virtual Perception* TimePerception::MakeCopy | ( | ) | [virtual] |
static void TimePerception::NormalizeReaction | ( | Reaction * | reaction | ) | [static] |
Called from Reaction for time types to normalize the values used.
This to allow 1.5hour random values.
Check if this perception should react to a reaction.
reaction | The reaction to check for. |
npc | The NPC that might receive this. |
Reimplemented from Perception.
virtual csString TimePerception::ToString | ( | NPC * | npc | ) | [virtual] |
Get a text description of the perception.
Reimplemented from Perception.
int TimePerception::gameDay [protected] |
Definition at line 186 of file perceptions.h.
int TimePerception::gameHour [protected] |
Definition at line 186 of file perceptions.h.
int TimePerception::gameMinute [protected] |
Definition at line 186 of file perceptions.h.
int TimePerception::gameMonth [protected] |
Definition at line 186 of file perceptions.h.
int TimePerception::gameYear [protected] |
Definition at line 186 of file perceptions.h.