/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Silvan Nellen co-programmer: ... */ #include "tick_trigger.h" #include "debug.h" ObjectListDefinition(TickTrigger); CREATE_FACTORY(TickTrigger); CREATE_SCRIPTABLE_CLASS(TickTrigger, // Coordinates addMethod("setAbsCoor", Executor3(&PNode::setAbsCoor)) ->addMethod("getAbsCoorX", Executor0ret(&PNode::getAbsCoorX)) ->addMethod("getAbsCoorY", Executor0ret(&PNode::getAbsCoorY)) ->addMethod("getAbsCoorZ", Executor0ret(&PNode::getAbsCoorZ)) //Properties ->addMethod("setName", Executor1(&BaseObject::setName)) ->addMethod("setScript", Executor1(&ScriptTrigger::setScript)) ->addMethod("setFunction", Executor1(&ScriptTrigger::setFunction)) ->addMethod("setDebugDraw", Executor1(&ScriptTrigger::setDebugDraw)) ); /** * Constructs a new TickTrigger. * @param root the xml element to load the parameters from. * */ TickTrigger::TickTrigger(const TiXmlElement* root) { this->registerObject(this, TickTrigger::_objectList); this->toList(OM_COMMON); } /** * Deletes the TickTrigger. * */ TickTrigger::~TickTrigger() { } void TickTrigger::tick(float timestep) { if( scriptFinished ) return; this->executeAction(timestep); }