Changeset 3631 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Mar 22, 2005, 12:10:09 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3629 r3631 166 166 this->setClassName ("World"); 167 167 168 this->worldName = "Just a test level";168 this->worldName = name; 169 169 this->debugWorldNr = worldID; 170 170 this->entities = new tList<WorldEntity>(); -
orxonox/trunk/src/world_entities/player.cc
r3620 r3631 51 51 acceleration = 10.0; 52 52 //weapons: 53 Weapon* wp = new TestGun( );53 Weapon* wp = new TestGun(this, new Vector(), new Quaternion); 54 54 this->weapons->add(wp); 55 55 this->activeWeapon = wp; -
orxonox/trunk/src/world_entities/projectile.cc
r3629 r3631 83 83 glMultMatrixf((float*)matrix); 84 84 //this->model->draw(); 85 PRINTF(1)("draw draw draw draw draw draw \n");86 85 this->projectileModel->draw(); 87 86 -
orxonox/trunk/src/world_entities/test_gun.cc
r3629 r3631 14 14 main-programmer: Patrick Boenzli 15 15 co-programmer: 16 17 18 \todo: direction in which the projectile flights 19 \todo: a target to set/hit 16 20 */ 17 21 … … 35 39 creates a new weapon 36 40 */ 37 TestGun::TestGun () : Weapon() 41 TestGun::TestGun (PNode* parent, Vector* coordinate, Quaternion* direction) 42 : Weapon (parent, coordinate, direction) 38 43 {} 39 44 … … 78 83 { 79 84 printf("TestGun::fire() - firing weapon now ---------------------------\n"); 80 //WorldEntity* pj = new Projectile(); 81 //this->worldEntities->add(pj); 85 WorldEntity* pj = new Projectile(); 86 pj->setAbsCoor( &this->getAbsCoor()); 87 pj->setAbsDir( &this->getAbsDir()); 88 this->worldEntities->add(pj); 82 89 } 83 90 -
orxonox/trunk/src/world_entities/test_gun.h
r3618 r3631 27 27 28 28 class Projectile; 29 class Vector; 30 class Quaternion; 29 31 30 32 … … 34 36 35 37 public: 36 TestGun ( );38 TestGun (PNode* parent, Vector* coordinate, Quaternion* direction); 37 39 virtual ~TestGun (); 38 40 -
orxonox/trunk/src/world_entities/weapon.cc
r3620 r3631 34 34 creates a new weapon 35 35 */ 36 Weapon::Weapon () : WorldEntity() 37 { 36 Weapon::Weapon (PNode* parent, Vector* coordinate, Quaternion* direction) 37 : WorldEntity() 38 { 39 parent->addChild(this, PNODE_ROTATE_AND_MOVE); 40 this->setRelCoor(coordinate); 41 this->setRelDir(direction); 38 42 WorldInterface* wi = WorldInterface::getInstance(); 39 43 this->worldEntities = wi->getEntityList(); -
orxonox/trunk/src/world_entities/weapon.h
r3629 r3631 43 43 44 44 public: 45 Weapon ( );45 Weapon (PNode* parent, Vector* coordinate, Quaternion* direction); 46 46 virtual ~Weapon (); 47 47
Note: See TracChangeset
for help on using the changeset viewer.