Rev | Line | |
---|
[4844] | 1 | /*! |
---|
| 2 | * @file mover_trigger_key.h |
---|
| 3 | * Gets triggered when player presses a key. |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _MOVER_TRIGGER_KEY_H |
---|
| 7 | #define _MOVER_TRIGGER_KEY_H |
---|
| 8 | |
---|
| 9 | #include "mover_trigger.h" |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | class KeyTrigger : public MoverTrigger |
---|
| 13 | { |
---|
| 14 | ObjectListDeclaration(KeyTrigger); |
---|
| 15 | |
---|
| 16 | public: |
---|
| 17 | KeyTrigger(const TiXmlElement* root = NULL); |
---|
| 18 | virtual void loadParams(const TiXmlElement* root); |
---|
| 19 | void setKey(const std::string& keyName) { this->keyName = keyName; } |
---|
| 20 | |
---|
| 21 | private: |
---|
| 22 | virtual bool checkIsTriggered(); |
---|
| 23 | std::string keyName; |
---|
| 24 | }; |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | #endif |
---|
| 28 | |
---|
Note: See
TracBrowser
for help on using the repository browser.