Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8783 in orxonox.OLD for trunk/src/world_entities/script_trigger.cc


Ignore:
Timestamp:
Jun 26, 2006, 2:00:31 PM (18 years ago)
Author:
patrick
Message:

merged the script engine branche back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/script_trigger.cc

    r8711 r8783  
    2121#include "state.h"
    2222
     23
     24CREATE_SCRIPTABLE_CLASS(ScriptTrigger, CL_SCRIPT_TRIGGER,
     25                            addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
     26                                ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
     27                                ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY))
     28                                ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))
     29                       );
    2330
    2431
     
    4047  scriptIsOk = false;
    4148  triggerLasts = false;
     49  addToScript = false;
     50 
     51  if(root != NULL)
     52  {
     53   
    4254  loadParams(root);
    43 
     55 
     56  if(addToScript)
     57  {
     58    script->addObject( "ScriptTrigger", this->getName());
     59  }
     60 
     61  }
    4462}
    4563
     
    6078void ScriptTrigger::loadParams(const TiXmlElement* root)
    6179{
    62   if(root != NULL)
    63   {
     80
    6481    WorldEntity ::loadParams(root);
    6582
     
    97114        .describe("True if the script should only be called once")
    98115        .defaultValues("");
    99   }
    100 
     116    LoadParam(root, "addtoscript", this, ScriptTrigger, setAddToScript)
     117        .describe("True if this scripttrigger should be aviable in the script")
     118        .defaultValues("");
    101119}
    102120
Note: See TracChangeset for help on using the changeset viewer.