/*! * @file mover_trigger_approach.h * Gets triggered when a player enters a radius or a box. */ #ifndef _MOVER_TRIGGER_APPROACH_H #define _MOVER_TRIGGER_APPROACH_H #include "mover_trigger.h" class ApproachTrigger : public MoverTrigger { ObjectListDeclaration(ApproachTrigger); public: ApproachTrigger(const TiXmlElement* root = NULL); virtual void loadParams(const TiXmlElement* root); void setRadius(float radius) { this->radius = radius; } void setDistance(float x, float y, float z) { this->distanceX = x; this->distanceY = y; this->distanceZ = z; } void setOnlyHumans(bool onlyHumans = true) { this->onlyHumans = onlyHumans; } void setOnlyNPCs(bool onlyNPCs = true) { this->onlyNPCs = onlyNPCs; } private: virtual bool checkIsTriggered(); float radius; float distanceX; float distanceY; float distanceZ; bool onlyHumans; bool onlyNPCs; }; #endif