Changeset 9757 in orxonox.OLD for branches/new_class_id/src/world_entities
- Timestamp:
- Sep 18, 2006, 10:06:19 PM (18 years ago)
- Location:
- branches/new_class_id/src/world_entities
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/world_entities/creatures/fps_player.cc
r9746 r9757 46 46 47 47 #include "script_class.h" 48 CREATE_SCRIPTABLE_CLASS(FPSPlayer, FPSPlayer::classID(),48 CREATE_SCRIPTABLE_CLASS(FPSPlayer, 49 49 addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor)) 50 50 ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX)) … … 167 167 168 168 //subscribe to collision reaction 169 this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, BspEntity:: classID());169 this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, BspEntity::staticClassID()); 170 170 171 171 this->initWeapon = false; -
branches/new_class_id/src/world_entities/environments/mapped_water.cc
r9746 r9757 32 32 SHELL_COMMAND(output, MappedWater, saveParams); 33 33 34 CREATE_SCRIPTABLE_CLASS(MappedWater, MappedWater::classID(),34 CREATE_SCRIPTABLE_CLASS(MappedWater, 35 35 addMethod("waterUV", Executor2<MappedWater, lua_State*, float, float>(&MappedWater::fadeWaterUV)) 36 36 ->addMethod("waterFlow", Executor2<MappedWater, lua_State*, float, float>(&MappedWater::fadeWaterFlow)) -
branches/new_class_id/src/world_entities/npcs/attractor_mine.cc
r9746 r9757 37 37 CREATE_FACTORY(AttractorMine); 38 38 #include "script_class.h" 39 CREATE_SCRIPTABLE_CLASS(AttractorMine, AttractorMine::classID(),39 CREATE_SCRIPTABLE_CLASS(AttractorMine, 40 40 addMethod("setName", Executor1<BaseObject, lua_State*,const std::string&>(&BaseObject::setName)) 41 41 //Coordinates -
branches/new_class_id/src/world_entities/npcs/gate.cc
r9746 r9757 37 37 38 38 #include "script_class.h" 39 CREATE_SCRIPTABLE_CLASS(Gate, Gate::classID(),39 CREATE_SCRIPTABLE_CLASS(Gate, 40 40 addMethod("hide", Executor0<WorldEntity, lua_State*>(&WorldEntity::hide)) 41 41 ->addMethod("unhide", Executor0<WorldEntity, lua_State*>(&WorldEntity::unhide)) -
branches/new_class_id/src/world_entities/npcs/generic_npc.cc
r9746 r9757 37 37 38 38 #include "script_class.h" 39 CREATE_SCRIPTABLE_CLASS(GenericNPC, GenericNPC::classID(),39 CREATE_SCRIPTABLE_CLASS(GenericNPC, 40 40 // Move 41 41 addMethod("walkTo", Executor3<GenericNPC, lua_State*,float,float,float>(&GenericNPC::walkTo)) … … 95 95 96 96 // collision reaction registration 97 this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, BspEntity:: classID());97 this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, BspEntity::staticClassID()); 98 98 } 99 99 -
branches/new_class_id/src/world_entities/playable.cc
r9715 r9757 110 110 { 111 111 /// FIXME TOTALLY 112 if(powerUp->isA(WeaponPowerUp:: classID()))112 if(powerUp->isA(WeaponPowerUp::staticClassID())) 113 113 { 114 114 return static_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager()); 115 115 } 116 else if(powerUp->isA(ParamPowerUp:: classID()))116 else if(powerUp->isA(ParamPowerUp::staticClassID())) 117 117 { 118 118 ParamPowerUp* ppu = static_cast<ParamPowerUp*>(powerUp); -
branches/new_class_id/src/world_entities/power_ups/power_up.cc
r9727 r9757 122 122 void PowerUp::collidesWith (WorldEntity* entity, const Vector& location) 123 123 { 124 if(this->collider != entity && entity->isA(Extendable:: classID()))124 if(this->collider != entity && entity->isA(Extendable::staticClassID())) 125 125 { 126 126 this->collider = entity; -
branches/new_class_id/src/world_entities/script_trigger.cc
r9746 r9757 22 22 ObjectListDefinition(ScriptTrigger); 23 23 24 CREATE_SCRIPTABLE_CLASS(ScriptTrigger, ScriptTrigger::classID(),24 CREATE_SCRIPTABLE_CLASS(ScriptTrigger, 25 25 // Coordinates 26 26 addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor)) -
branches/new_class_id/src/world_entities/space_ships/helicopter.cc
r9746 r9757 38 38 CREATE_FACTORY(Helicopter); 39 39 #include "script_class.h" 40 CREATE_SCRIPTABLE_CLASS(Helicopter, Helicopter::classID(),40 CREATE_SCRIPTABLE_CLASS(Helicopter, 41 41 addMethod("moveUp", Executor1<Helicopter, lua_State*,bool>(&Helicopter::moveUp)) 42 42 ->addMethod("moveDown", Executor1<Helicopter, lua_State*,bool>(&Helicopter::moveDown)) -
branches/new_class_id/src/world_entities/space_ships/hover.cc
r9746 r9757 39 39 40 40 #include "script_class.h" 41 CREATE_SCRIPTABLE_CLASS(Hover, Hover::classID(),41 CREATE_SCRIPTABLE_CLASS(Hover, 42 42 addMethod("hasPlayer", Executor0ret<Playable, lua_State*,bool>(&Playable::hasPlayer)) 43 43 //Coordinates -
branches/new_class_id/src/world_entities/space_ships/space_ship.cc
r9746 r9757 58 58 59 59 #include "script_class.h" 60 CREATE_SCRIPTABLE_CLASS(SpaceShip, SpaceShip::classID(),60 CREATE_SCRIPTABLE_CLASS(SpaceShip, 61 61 addMethod("hasPlayer", Executor0ret<Playable, lua_State*,bool>(&Playable::hasPlayer)) 62 62 ->addMethod("fire", Executor1<Playable, lua_State*, bool>(&Playable::fire)) -
branches/new_class_id/src/world_entities/space_ships/spacecraft_2d.cc
r9746 r9757 42 42 CREATE_FACTORY(Spacecraft2D); 43 43 44 CREATE_SCRIPTABLE_CLASS(Spacecraft2D, Spacecraft2D::classID(),44 CREATE_SCRIPTABLE_CLASS(Spacecraft2D, 45 45 addMethod("hasPlayer", Executor0ret<Playable, lua_State*,bool>(&Playable::hasPlayer)) 46 46 //Coordinates -
branches/new_class_id/src/world_entities/test_entity.cc
r9746 r9757 40 40 41 41 #include "script_class.h" 42 CREATE_SCRIPTABLE_CLASS(TestEntity, TestEntity::classID(),42 CREATE_SCRIPTABLE_CLASS(TestEntity, 43 43 addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor)) 44 44 ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX)) -
branches/new_class_id/src/world_entities/weapons/aiming_system.cc
r9727 r9757 62 62 // registering default reactions: 63 63 this->unsubscribeReaction(CREngine::CR_OBJECT_DAMAGE); 64 this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, WorldEntity:: classID());64 this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, WorldEntity::staticClassID()); 65 65 66 66 this->range = 1000.0f; -
branches/new_class_id/src/world_entities/weapons/weapon.cc
r9723 r9757 77 77 if (createdObject != NULL) 78 78 { 79 if (createdObject->isA(Weapon:: classID()))79 if (createdObject->isA(Weapon::staticClassID())) 80 80 return dynamic_cast<Weapon*>(createdObject); 81 81 else … … 93 93 if (createdObject != NULL) 94 94 { 95 if (createdObject->isA(Weapon:: classID()))95 if (createdObject->isA(Weapon::staticClassID())) 96 96 return dynamic_cast<Weapon*>(createdObject); 97 97 else … … 131 131 this->defaultTarget = NULL; //< Nothing is Targeted by default. 132 132 133 this->projectile = NullClass:: classID(); //< No Projectile Class is Connected to this weapon133 this->projectile = NullClass::staticClassID(); //< No Projectile Class is Connected to this weapon 134 134 this->projectileFactory = NULL; //< No Factory generating Projectiles is selected. 135 135 -
branches/new_class_id/src/world_entities/weapons/weapon_manager.cc
r9755 r9757 298 298 { 299 299 this->parentNode->addChild(weapon); 300 if (this->parentEntity->isA(Playable:: classID()))300 if (this->parentEntity->isA(Playable::staticClassID())) 301 301 dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged(); 302 302 weapon->setDefaultTarget(this->crosshair); … … 468 468 else 469 469 this->currentSlotConfig[i].position.deactivateNode(); 470 if (this->parentEntity != NULL && this->parentEntity->isA(Playable:: classID()))470 if (this->parentEntity != NULL && this->parentEntity->isA(Playable::staticClassID())) 471 471 dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged(); 472 472 }
Note: See TracChangeset
for help on using the changeset viewer.