Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2007, 10:02:06 PM (16 years ago)
Author:
landauf
Message:

added a "Tickable"-interface
added a "Timer"-class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/test2.cc

    r258 r375  
    1414        this->usefullClass2_ = Class(Test2);
    1515        this->usefullClass3_ = Class(Test3);
     16
     17        timer1.setTimer(1, true, this, &Test2::timerFunction1);
     18        timer2.setTimer(5, true, this, &Test2::timerFunction2);
     19        timer3.setTimer(10, false, this, &Test2::timerFunction3);
    1620    }
    1721
    1822    Test2::~Test2()
    1923    {
     24    }
     25
     26    void Test2::timerFunction1()
     27    {
     28        std::cout << "Test2: 1 Sekunde\n";
     29    }
     30
     31    void Test2::timerFunction2()
     32    {
     33        std::cout << "Test2: 5 Sekunden\n";
     34    }
     35
     36    void Test2::timerFunction3()
     37    {
     38        std::cout << "Test2: 10 Sekunden sind um!\n";
    2039    }
    2140
Note: See TracChangeset for help on using the changeset viewer.