Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10621 in orxonox.OLD


Ignore:
Timestamp:
Apr 5, 2007, 6:16:07 PM (17 years ago)
Author:
snellen
Message:

added and tested a new kind of trigger: the time trigger

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

Legend:

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

    r10620 r10621  
    7676}
    7777
     78/**
     79 * Reads the values from the tml element and sets them.
     80 * @param root the xml element to load the parameters from.
     81 *
     82 */
     83void TimeTrigger::loadParams(const TiXmlElement* root)
     84{
     85
     86  ScriptTrigger ::loadParams(root);
     87
     88  LoadParam(root, "delay", this, TimeTrigger, setDelay)
     89      .describe("the time after wich the timer is activated")
     90      .defaultValues(0);
     91 
     92}
    7893
    7994void TimeTrigger::tick(float timestep)
  • branches/scriptimprovements/src/world_entities/script_triggers/time_trigger.h

    r10620 r10621  
    2020    ~TimeTrigger();
    2121   
     22    ///LOADING
     23    virtual void loadParams(const TiXmlElement* root);
     24   
    2225    void setDelay(float newDelay){this->currentTime = this->delay = newDelay;}
    2326    void start(){ this->isStopped = false; }
Note: See TracChangeset for help on using the changeset viewer.