- Timestamp:
- Jul 3, 2006, 1:35:40 PM (18 years ago)
- Location:
- branches/single_player_map/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/lib/collision_reaction/cr_object_damage.cc
r9008 r9031 56 56 float damage = 0.0f; 57 57 58 PRINTF(0)("Dealing damage - Handling collision: %s vs %s\n",59 collision->getEntityA()->getClassName(),60 collision->getEntityB()->getClassName());58 // PRINTF(0)("Dealing damage - Handling collision: %s vs %s\n", 59 // collision->getEntityA()->getClassName(), 60 // collision->getEntityB()->getClassName()); 61 61 62 62 // the collision damage been dealed by the entity … … 65 65 collision->getEntityA()->hit(damage, collision->getEntityB()); 66 66 } 67 PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName());67 // PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName()); 68 68 69 69 if( collision->isEntityBCollide()) { … … 71 71 collision->getEntityB()->hit(damage, collision->getEntityA()); 72 72 } 73 PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName());73 // PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName()); 74 74 75 75 collision->flushCollisionEvents(); -
branches/single_player_map/src/lib/script_engine/script.cc
r9020 r9031 26 26 CREATE_SCRIPTABLE_CLASS(Script, CL_SCRIPT, 27 27 addMethod("addObject", ExecutorLua2<Script,const std::string&, const std::string& >(&Script::addObject)) 28 //->addMethod("selectFunction", ExecutorLua2ret<Script, bool, const std::string&, int >(&Script::selectFunction))28 // ->addMethod("selectFunction", ExecutorLua2ret<Script, bool, const std::string&, int >(&Script::selectFunction)) 29 29 ->addMethod("executeFunction", ExecutorLua0ret<Script,bool >(&Script::executeFunction)) 30 30 ); … … 82 82 filedest += "scripts/" + filename; 83 83 84 this->addThisScript(); 85 this->registerStandartClasses(); 86 84 87 if(currentFile.length() != 0) 85 88 { … … 98 101 { 99 102 currentFile = filename; 100 this->addThisScript();101 this->registerStandartClasses();102 103 return true; 103 104 } … … 121 122 void Script::addObject(const std::string& className, const std::string& objectName) 122 123 { 123 // printf("Script %p: I am about to add %s of class %s\n",this,objectName.c_str(),className.c_str());124 //printf("Script %s: I am about to add %s of class %s\n",this->getName(),objectName.c_str(),className.c_str()); 124 125 125 126 BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS); … … 359 360 //success = this->registerClass(std::string("Vector")); 360 361 success = this->registerClass("ScriptTrigger"); 361 success = this->registerClass("Script"); 362 362 363 363 return success; 364 364 } -
branches/single_player_map/src/world_entities/npcs/generic_npc.cc
r9020 r9031 40 40 ->addMethod("turnTo", ExecutorLua1<GenericNPC,float>(&GenericNPC::turnTo)) 41 41 ->addMethod("finalGoalReached", ExecutorLua0ret<GenericNPC,bool>(&GenericNPC::finalGoalReached)) 42 // Animation and sound 43 ->addMethod("playAnimation", ExecutorLua2<GenericNPC,int,int>(&GenericNPC::playAnimation)) 44 //->addMethod("playSound", ExecutorLua1<GenericNPC,const std::string&>(&GenericNPC::playSound)) 42 45 // Display 43 46 ->addMethod("hide", ExecutorLua0<WorldEntity>(&WorldEntity::hide)) -
branches/single_player_map/src/world_entities/playable.h
r8724 r9031 56 56 57 57 // Player Settup 58 bool hasPlayer(){return !(this->currentPlayer == NULL);} 58 59 bool setPlayer(Player* player); 59 60 Player* getCurrentPlayer() const { return this->currentPlayer; }; -
branches/single_player_map/src/world_entities/space_ships/space_ship.cc
r9008 r9031 55 55 56 56 CREATE_FACTORY(SpaceShip, CL_SPACE_SHIP); 57 57 #include "script_class.h" 58 CREATE_SCRIPTABLE_CLASS(SpaceShip, CL_SPACE_SHIP, 59 addMethod("hasPlayer", ExecutorLua0ret<Playable,bool>(&Playable::hasPlayer)) 60 ); 58 61 59 62 /**
Note: See TracChangeset
for help on using the changeset viewer.