Changeset 6233 in orxonox.OLD for branches/powerups/src
- Timestamp:
- Dec 21, 2005, 3:09:37 PM (19 years ago)
- Location:
- branches/powerups/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/defs/class_id.h
r6222 r6233 74 74 75 75 // subsuper-classes derivations taken : 1, 2, 5, a, b, c. << THIS IS A LIST OF ALL THE DCL_MASK_SUBSUPERCLASS_ID's taken 76 76 77 // subsuper-classes 77 78 CL_MASK_SUBSUPER_CLASS = 0x00fff000, … … 87 88 CL_WEAPON = 0x00210000, 88 89 CL_POWER_UP = 0x00220000, 89 CL_EXTENDABLE = 0x00220000, 90 90 CL_EXTENDABLE = 0x00240000, 91 91 // SUPER-Modeling 92 92 CL_TEXTURE = 0x00c01000, -
branches/powerups/src/world_entities/power_ups/param_power_up.cc
r6222 r6233 19 19 #include "factory.h" 20 20 #include "state.h" 21 #include "list.h" 21 22 22 23 #include "primitive_model.h" -
branches/powerups/src/world_entities/power_ups/power_up.cc
r6150 r6233 33 33 this->sphereMaterial->setTransparency(.1); 34 34 this->sphereMaterial->setDiffuse(r, g, b); 35 36 35 this->toList(OM_COMMON); 37 36 } -
branches/powerups/src/world_entities/power_ups/weapon_power_up.cc
r6222 r6233 19 19 #include "factory.h" 20 20 #include "state.h" 21 #include "list.h" 21 22 22 23 #include "primitive_model.h" -
branches/powerups/src/world_entities/space_ships/space_ship.cc
r6222 r6233 31 31 #include "key_mapper.h" 32 32 #include "event_handler.h" 33 34 #include "power_ups/weapon_power_up.h" 35 #include "power_ups/param_power_up.h" 33 36 34 37 #include "graphics_engine.h" … … 430 433 else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed) 431 434 this->getWeaponManager()->previousWeaponConfig(); 432 433 435 else if( event.type == SDLK_w) 434 436 this->bUp = event.bPressed; //this->shiftCoor(0,.1,0); … … 443 445 this->setAbsDir(mouseDir); 444 446 } 447 } 448 449 /** 450 * 451 */ 452 bool SpaceShip::pickup(PowerUp* powerUp) 453 { 454 if(powerUp->isA(CL_WEAPON_POWER_UP)) { 455 Weapon* weapon = dynamic_cast<WeaponPowerUp*>(powerUp)->getWeapon(); 456 WeaponManager* manager = this->getWeaponManager(); 457 int slot = manager->getNextFreeSlot(0, weapon->getCapability()); 458 if(slot >= 0) { 459 manager->addWeapon(weapon, 0, slot); 460 return true; 461 } 462 } 463 else if(powerUp->isA(CL_PARAM_POWER_UP)) { 464 ParamPowerUp* ppu = dynamic_cast<ParamPowerUp*>(powerUp); 465 switch(ppu->getType()) { 466 case PARAM_SHIELD: 467 break; 468 } 469 } 470 return false; 445 471 } 446 472 -
branches/powerups/src/world_entities/space_ships/space_ship.h
r6222 r6233 8 8 9 9 #include "playable.h" 10 #include "extendable.h" 10 11 11 12 … … 14 15 class Event; 15 16 16 class SpaceShip : public Playable 17 class SpaceShip : public Playable, public Extendable 17 18 { 18 19 … … 41 42 42 43 virtual void process(const Event &event); 43 44 bool pickup(PowerUp* powerUp); 44 45 45 46
Note: See TracChangeset
for help on using the changeset viewer.