User Tools

Site Tools


en:examples:clocks:basic_clock

Basic Clock

void orxFASTCALL DoSomethingUpdate(const orxCLOCK_INFO *_pstClockInfo, void *_pstContext){
   //Do something
}
 
orxSTATUS orxFASTCALL Init()
{
    orxCLOCK *pstDoSomethingClock = orxClock_Create(orx2F(2.0f), orxCLOCK_TYPE_USER); //every two seconds
    orxClock_Register(pstDoSomethingClock, DoSomethingUpdate, orxNULL, orxMODULE_ID_MAIN, orxCLOCK_PRIORITY_NORMAL);
}
en/examples/clocks/basic_clock.txt · Last modified: 2018/02/14 00:47 (7 years ago) by 127.0.0.1