Changeset 3618 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Mar 21, 2005, 3:26:26 PM (20 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/player.cc
r3608 r3618 192 192 void Player::fire() 193 193 { 194 if( this->bFire)194 if( this->bFire) 195 195 { 196 196 if(this->activeWeapon != NULL) 197 197 this->activeWeapon->fire(); 198 198 } 199 if( this->bWeaponChange)199 if( this->bWeaponChange && this->weapons->getSize() > 1) 200 200 { 201 Weapon* w = this->weapons->enumerate(); 201 PRINTF(1)("changing the weapon of the player: deactivate old, activate new\n"); 202 this->activeWeapon->deactivate(); 203 this->weapons->enumerate(); 202 204 this->activeWeapon = this->weapons->nextElement(this->activeWeapon); 205 this->activeWeapon->activate(); 203 206 } 204 207 } -
orxonox/trunk/src/world_entities/primitive.h
r3616 r3618 1 /*! 2 \primitive.h 3 \brief representing a primitive body in the world: cube, sphere, cylinder etc... 4 */ 5 6 1 7 #ifndef _PRIMITIVE_H 2 8 #define _PRIMITIVE_H … … 34 40 GLUquadricObj* object; //!< the object to be rendered 35 41 Material* material; //!< A Material for the SkySphere. 36 pForm form; 37 char* textureName; 38 float size; 39 int segments; 42 pForm form; //!< the chooesen form for the entity 43 char* textureName; //!< if there is a texture. this is the name for it 44 float size; //!< size of the object, from [0..1] 45 int segments; //!< segment count 40 46 41 47 void glDrawCube(); -
orxonox/trunk/src/world_entities/projectile.cc
r3579 r3618 18 18 19 19 #include "projectile.h" 20 #include "stdincl.h" 20 21 21 #include "world_entity.h" 22 #include "objModel.h" 23 #include "primitive.h" 22 24 #include "vector.h" 23 #include "objModel.h"24 25 25 26 using namespace std; … … 31 32 Projectile::Projectile () : WorldEntity() 32 33 { 33 this->model = new OBJModel(""); 34 //this->model = new OBJModel(""); 35 this->projectileModel = new Primitive(P_SPHERE); 34 36 } 35 37 -
orxonox/trunk/src/world_entities/projectile.h
r3583 r3618 9 9 #include "world_entity.h" 10 10 11 class Primitive; 11 12 12 13 class Projectile : public WorldEntity … … 26 27 private: 27 28 //physical attriutes like: force, speed, acceleration etc. 29 Primitive* projectileModel; 28 30 29 31 }; -
orxonox/trunk/src/world_entities/weapon.h
r3583 r3618 57 57 bool isActive(void); 58 58 59 v irtual void setWeaponIdleTime(float time);60 virtualfloat getWeaponIdleTime(void);61 virtualbool hasWeaponIdleTimeElapsed(void);59 void setWeaponIdleTime(float time); 60 float getWeaponIdleTime(void); 61 bool hasWeaponIdleTimeElapsed(void); 62 62 63 63 virtual void fire(void);
Note: See TracChangeset
for help on using the changeset viewer.