Changeset 10665 in orxonox.OLD for trunk/src/world_entities/effects
- Timestamp:
- May 31, 2007, 3:45:23 PM (18 years ago)
- Location:
- trunk/src/world_entities/effects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/effects/explosion.cc
r10317 r10665 25 25 #include "particles/sprite_particles.h" 26 26 27 28 29 30 27 ObjectListDefinition(Explosion); 31 28 CREATE_FAST_FACTORY_STATIC(Explosion); 29 30 #include "script_class.h" 31 CREATE_SCRIPTABLE_CLASS(Explosion, 32 // Coordinates 33 addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX)) 34 ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY)) 35 ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ)) 36 ->addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor)) 37 ->addMethod("setAbsDir", Executor4<PNode, lua_State*,float,float,float,float>(&PNode::setAbsDir)) 38 //Explode ! 39 ->addMethod("explode", Executor3<Explosion, lua_State*, float, float, float>(&Explosion::explode)) 40 ); 32 41 33 42 /** … … 69 78 explosion->setAbsCoor(position->getAbsCoor()); 70 79 explosion->emitter->setSize(size); 80 explosion->activate(); 81 } 82 83 84 void Explosion::explode(float x, float y, float z) 85 { 86 Explosion* explosion = dynamic_cast<Explosion*>(Explosion::fastFactory->resurrect()); 87 explosion->setAbsCoor(this->getAbsCoor()); 88 explosion->emitter->setSize(Vector(x,y,z)); 71 89 explosion->activate(); 72 90 } -
trunk/src/world_entities/effects/explosion.h
r9869 r10665 18 18 public: 19 19 static void explode (PNode* position, const Vector& size); 20 20 void explode (float x, float y, float z); /// Explode at the current position with size (x,y,z) 21 21 22 Explosion (); 22 23 virtual ~Explosion ();
Note: See TracChangeset
for help on using the changeset viewer.