Changeset 6547 in orxonox.OLD for trunk/src/world_entities/space_ships
- Timestamp:
- Jan 18, 2006, 2:12:53 PM (19 years ago)
- Location:
- trunk/src/world_entities/space_ships
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/space_ship.cc
r6532 r6547 123 123 PRINTF(4)("SPACESHIP INIT\n"); 124 124 125 //EventHandler::getInstance()->grabEvents(true);125 EventHandler::getInstance()->grabEvents(true); 126 126 127 127 bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false; … … 450 450 //this->setAbsDir(mouseDir); 451 451 } 452 }453 454 /**455 *456 */457 bool SpaceShip::pickup(PowerUp* powerUp)458 {459 if(powerUp->isA(CL_WEAPON_POWER_UP)) {460 Weapon* weapon = dynamic_cast<WeaponPowerUp*>(powerUp)->getWeapon();461 WeaponManager* manager = this->getWeaponManager();462 int slot = manager->getNextFreeSlot(0, weapon->getCapability());463 if(slot >= 0) {464 manager->addWeapon(weapon, 0, slot);465 return true;466 }467 }468 else if(powerUp->isA(CL_PARAM_POWER_UP)) {469 ParamPowerUp* ppu = dynamic_cast<ParamPowerUp*>(powerUp);470 switch(ppu->getType()) {471 case PARAM_SHIELD:472 break;473 }474 }475 return false;476 452 } 477 453 -
trunk/src/world_entities/space_ships/space_ship.h
r6512 r6547 15 15 class Event; 16 16 17 class SpaceShip : public Playable , public Extendable17 class SpaceShip : public Playable 18 18 { 19 19 … … 39 39 40 40 virtual void process(const Event &event); 41 bool pickup(PowerUp* powerUp);42 41 43 42 virtual int writeBytes(const byte* data, int length, int sender);
Note: See TracChangeset
for help on using the changeset viewer.