Changeset 8876 in orxonox.OLD for branches/single_player_map/src/world_entities
- Timestamp:
- Jun 28, 2006, 5:33:20 PM (19 years ago)
- Location:
- branches/single_player_map/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/door.cc
r8875 r8876 67 67 WorldEntity::loadParams(root); 68 68 69 // LoadParam(root, "", this, Door, set)70 // .describe("sets the animation of the md2 model")71 //.defaultValues(1);69 LoadParam(root, "", this, Door, setActionRadius) 70 .describe("sets the action radius of the door") 71 .defaultValues(1); 72 72 73 73 } 74 74 75 75 76 void Door::setAnim (int animationIndex, int animPlaybackMode)76 void Door::setAnimation(int animationIndex, int animPlaybackMode) 77 77 { 78 78 if( likely(this->getModel(0) != NULL)) … … 86 86 ((InteractiveModel*)this->getModel(0))->tick(time); 87 87 88 89 } 90 91 92 /** 93 * open the door 94 */ 95 void Door::open() 96 { 97 if( this->bLocked) 98 return; 99 100 // this->setAnimation(); 101 102 } 103 104 105 /** 106 * close the door 107 */ 108 void Door::close() 109 { 88 110 89 111 } -
branches/single_player_map/src/world_entities/door.h
r8875 r8876 18 18 virtual void loadParams(const TiXmlElement* root); 19 19 20 void setAnim(int animationIndex, int animPlaybackMode);21 20 void setActionRadius(float radius) { this->actionRadius = radius; } 22 21 … … 26 25 void close(); 27 26 27 void lock() { this->bLocked = true; } 28 void unlock() { this->bLocked = false; } 29 bool isLocked() const { return this->bLocked; } 30 31 28 32 private: 29 33 bool checkOpen(); 34 void setAnimation(int animationIndex, int animPlaybackMode); 35 30 36 31 37 private: 32 38 bool bOpen; //!< true if the door is open 39 bool bLocked; //!< true if this door is locked 33 40 float actionRadius; //!< action radius 41 34 42 35 43 };
Note: See TracChangeset
for help on using the changeset viewer.