Changeset 8880 in orxonox.OLD
- Timestamp:
- Jun 28, 2006, 6:02:33 PM (18 years ago)
- Location:
- branches/single_player_map/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/lib/graphics/importer/md2/md2Model.h
r8879 r8880 69 69 70 70 //! animation names enumeration 71 typedef enum animType71 typedef enum MD2animType 72 72 { 73 73 STAND, //0 -
branches/single_player_map/src/world_entities/door.cc
r8879 r8880 22 22 23 23 #include "interactive_model.h" 24 #include "md2/md2Model.h" 24 25 25 26 26 #include "door.h" … … 32 32 33 33 CREATE_FACTORY(Door, CL_DOOR); 34 35 36 37 //! list of all different animations a std md2model supports 38 sAnim Door::animationList[2] = 39 { 40 // begin, end, fps, interruptable 41 { 0, 15, 9, 0 }, //!< OPEN 42 { 15, 30, 9, 0 } //!< CLOSE 43 }; 44 34 45 35 46 … … 78 89 * sets the animatin of this entity 79 90 */ 80 void Door::setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback)91 void Door::setAnimation(int animNum, int playbackMode) 81 92 { 82 93 if( likely(this->getModel(0) != NULL)) … … 108 119 return; 109 120 110 this->setAnimation( 0, 1, 5, 0, MD2_ANIM_ONCE);121 this->setAnimation(DOOR_OPEN, MD2_ANIM_ONCE); 111 122 112 123 } -
branches/single_player_map/src/world_entities/door.h
r8879 r8880 4 4 #include "world_entity.h" 5 5 6 #include "md2/md2Model.h" 6 7 7 8 class TiXmlElement; 9 10 11 //! animation names enumeration 12 typedef enum DoorAnimType 13 { 14 OPEN = 0, 15 CLOSE, 16 17 MAX_ANIMATIONS 18 }; 8 19 9 20 … … 20 31 void setActionRadius(float radius) { this->actionRadius = radius; } 21 32 22 virtual void tick (float time);23 24 33 void open(); 25 34 void close(); … … 30 39 31 40 41 virtual void tick (float time); 42 43 32 44 private: 33 45 bool checkOpen(); 34 void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback);46 void setAnimation(int animNum, int playbackMode = 0); 35 47 36 48 … … 40 52 float actionRadius; //!< action radius 41 53 54 static sAnim animationList[2]; //!< list of the animations 42 55 43 56 };
Note: See TracChangeset
for help on using the changeset viewer.