Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10610 in orxonox.OLD


Ignore:
Timestamp:
Mar 29, 2007, 6:17:40 PM (18 years ago)
Author:
snellen
Message:

space trigger and tick trigger are now scriptable

Location:
branches/scriptimprovements/src/world_entities/script_triggers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/scriptimprovements/src/world_entities/script_triggers/script_trigger.cc

    r10609 r10610  
    2121#include "debug.h"
    2222ObjectListDefinition(ScriptTrigger);
    23 
    24 // CREATE_SCRIPTABLE_CLASS(ScriptTrigger,
    25 //             // Coordinates
    26 //                      addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
    27 //                          ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
    28 //                          ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY))
    29 //                          ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ))
    30 //             //Properties
    31 //                          ->addMethod("setName", Executor1<BaseObject, lua_State*, const std::string&>(&BaseObject::setName))
    32 //                          ->addMethod("setTarget", Executor1<ScriptTrigger, lua_State*, const std::string&>(&ScriptTrigger::setTarget))
    33 //                          ->addMethod("setTriggerParent", Executor1<ScriptTrigger, lua_State*, const std::string&>(&ScriptTrigger::setTriggerParent))
    34 //                          ->addMethod("setTriggerRemains", Executor1<ScriptTrigger, lua_State*, bool>(&ScriptTrigger::setTriggerRemains))
    35 //                          ->addMethod("setActiveOnCreation", Executor1<ScriptTrigger, lua_State*, bool>(&ScriptTrigger::setActiveOnCreation))
    36 //                          ->addMethod("setInvert", Executor1<ScriptTrigger, lua_State*, bool>(&ScriptTrigger::setInvert))
    37 //                          ->addMethod("setRadius", Executor1<ScriptTrigger, lua_State*, float>(&ScriptTrigger::setRadius))
    38 //                          ->addMethod("setScript", Executor1<ScriptTrigger, lua_State*, const std::string&>(&ScriptTrigger::setScript))
    39 //                          ->addMethod("setFunction", Executor1<ScriptTrigger, lua_State*, const std::string&>(&ScriptTrigger::setFunction))
    40 //                          ->addMethod("setDebugDraw", Executor1<ScriptTrigger, lua_State*, bool>(&ScriptTrigger::setDebugDraw))
    41 //                          ->addMethod("setAddToScript", Executor1<ScriptTrigger, lua_State*, bool>(&ScriptTrigger::setAddToScript))
    42 //              );
    4323
    4424
     
    134114    PRINTF(2)("ERROR SCRTIPTTRIGGER : Parent %s for %s::%s does not Exist\n", parent.c_str(), this->getClassCName(), this->getCName());
    135115  }
    136 }
    137 
    138 void ScriptTrigger::tick(float timestep)
    139 {
    140 
    141116}
    142117
  • branches/scriptimprovements/src/world_entities/script_triggers/space_trigger.cc

    r10609 r10610  
    2020ObjectListDefinition(SpaceTrigger);
    2121
    22 // CREATE_SCRIPTABLE_CLASS(SpaceTrigger,
    23 //             // Coordinates
    24 //                         addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
    25 //                             ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
    26 //                             ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY))
    27 //                             ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ))
    28 //             //Properties
    29 //                             ->addMethod("setName", Executor1<BaseObject, lua_State*, const std::string&>(&BaseObject::setName))
    30 //                             ->addMethod("setTarget", Executor1<SpaceTrigger, lua_State*, const std::string&>(&SpaceTrigger::setTarget))
    31 //                             ->addMethod("setTriggerParent", Executor1<SpaceTrigger, lua_State*, const std::string&>(&SpaceTrigger::setTriggerParent))
    32 //                             ->addMethod("setTriggerRemains", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setTriggerRemains))
    33 //                             ->addMethod("setActiveOnCreation", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setActiveOnCreation))
    34 //                             ->addMethod("setInvert", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setInvert))
    35 //                             ->addMethod("setRadius", Executor1<SpaceTrigger, lua_State*, float>(&SpaceTrigger::setRadius))
    36 //                             ->addMethod("setScript", Executor1<SpaceTrigger, lua_State*, const std::string&>(&SpaceTrigger::setScript))
    37 //                             ->addMethod("setFunction", Executor1<SpaceTrigger, lua_State*, const std::string&>(&SpaceTrigger::setFunction))
    38 //                             ->addMethod("setDebugDraw", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setDebugDraw))
    39 //                             ->addMethod("setAddToScript", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setAddToScript))
    40 //                        );
     22CREATE_SCRIPTABLE_CLASS(SpaceTrigger,
     23            // Coordinates
     24                        addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
     25                            ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
     26                            ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY))
     27                            ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ))
     28            //Properties
     29                            ->addMethod("setName", Executor1<BaseObject, lua_State*, const std::string&>(&BaseObject::setName))
     30                            ->addMethod("setTarget", Executor1<SpaceTrigger, lua_State*, const std::string&>(&SpaceTrigger::setTarget))
     31                            ->addMethod("setTriggerParent", Executor1<SpaceTrigger, lua_State*, const std::string&>(&SpaceTrigger::setTriggerParent))
     32                            ->addMethod("setTriggerRemains", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setTriggerRemains))
     33                            ->addMethod("setInvert", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setInvert))
     34                            ->addMethod("setRadius", Executor1<SpaceTrigger, lua_State*, float>(&SpaceTrigger::setRadius))
     35                            ->addMethod("setScript", Executor1<SpaceTrigger, lua_State*, const std::string&>(&SpaceTrigger::setScript))
     36                            ->addMethod("setFunction", Executor1<SpaceTrigger, lua_State*, const std::string&>(&SpaceTrigger::setFunction))
     37                            ->addMethod("setDebugDraw", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setDebugDraw))
     38                            ->addMethod("setAddToScript", Executor1<SpaceTrigger, lua_State*, bool>(&SpaceTrigger::setAddToScript))
     39                       );
    4140
    4241
  • branches/scriptimprovements/src/world_entities/script_triggers/tick_trigger.cc

    r10609 r10610  
    2020ObjectListDefinition(TickTrigger);
    2121
    22 // CREATE_SCRIPTABLE_CLASS(TickTrigger,
    23 //             // Coordinates
    24 //                         addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
    25 //                             ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
    26 //                             ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY))
    27 //                             ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ))
    28 //             //Properties
    29 //                             ->addMethod("setName", Executor1<BaseObject, lua_State*, const std::string&>(&BaseObject::setName))
    30 //                             ->addMethod("setTarget", Executor1<TickTrigger, lua_State*, const std::string&>(&TickTrigger::setTarget))
    31 //                             ->addMethod("setTriggerParent", Executor1<TickTrigger, lua_State*, const std::string&>(&TickTrigger::setTriggerParent))
    32 //                             ->addMethod("setTriggerRemains", Executor1<TickTrigger, lua_State*, bool>(&TickTrigger::setTriggerRemains))
    33 //                             ->addMethod("setActiveOnCreation", Executor1<TickTrigger, lua_State*, bool>(&TickTrigger::setActiveOnCreation))
    34 //                             ->addMethod("setInvert", Executor1<TickTrigger, lua_State*, bool>(&TickTrigger::setInvert))
    35 //                             ->addMethod("setRadius", Executor1<TickTrigger, lua_State*, float>(&TickTrigger::setRadius))
    36 //                             ->addMethod("setScript", Executor1<TickTrigger, lua_State*, const std::string&>(&TickTrigger::setScript))
    37 //                             ->addMethod("setFunction", Executor1<TickTrigger, lua_State*, const std::string&>(&TickTrigger::setFunction))
    38 //                             ->addMethod("setDebugDraw", Executor1<TickTrigger, lua_State*, bool>(&TickTrigger::setDebugDraw))
    39 //                             ->addMethod("setAddToScript", Executor1<TickTrigger, lua_State*, bool>(&TickTrigger::setAddToScript))
    40 //                        );
     22CREATE_SCRIPTABLE_CLASS(TickTrigger,
     23             // Coordinates
     24                        addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
     25                            ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
     26                            ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY))
     27                            ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ))
     28             //Properties
     29                            ->addMethod("setName", Executor1<BaseObject, lua_State*, const std::string&>(&BaseObject::setName))
     30                            ->addMethod("setScript", Executor1<ScriptTrigger, lua_State*, const std::string&>(&ScriptTrigger::setScript))
     31                            ->addMethod("setFunction", Executor1<ScriptTrigger, lua_State*, const std::string&>(&ScriptTrigger::setFunction))
     32                            ->addMethod("setDebugDraw", Executor1<ScriptTrigger, lua_State*, bool>(&ScriptTrigger::setDebugDraw))
     33             );
    4134
    4235
Note: See TracChangeset for help on using the changeset viewer.