Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/environments/mover_trigger_approach.h

Last change on this file was 10696, checked in by snellen, 17 years ago

added all the new mover classes

File size: 1016 bytes
Line 
1/*!
2 * @file mover_trigger_approach.h
3 *  Gets triggered when a player enters a radius or a box.
4 */
5
6#ifndef _MOVER_TRIGGER_APPROACH_H
7#define _MOVER_TRIGGER_APPROACH_H
8
9#include "mover_trigger.h"
10
11
12class ApproachTrigger : public MoverTrigger
13{
14    ObjectListDeclaration(ApproachTrigger);
15
16    public:
17        ApproachTrigger(const TiXmlElement* root = NULL);
18        virtual void loadParams(const TiXmlElement* root);
19        void setRadius(float radius) { this->radius = radius; }
20        void setDistance(float x, float y, float z) { this->distanceX = x; this->distanceY = y; this->distanceZ = z; }
21        void setOnlyHumans(bool onlyHumans = true) { this->onlyHumans = onlyHumans; }
22        void setOnlyNPCs(bool onlyNPCs = true) { this->onlyNPCs = onlyNPCs; }
23
24    private:
25        virtual bool checkIsTriggered();
26        float radius;
27        float distanceX;
28        float distanceY;
29        float distanceZ;
30        bool onlyHumans;
31        bool onlyNPCs;
32};
33
34
35#endif
36
Note: See TracBrowser for help on using the repository browser.