How does the SIO2timer works

View previous topic View next topic Go down

How does the SIO2timer works

Post  IanLinart on Wed Sep 09, 2009 2:15 pm

Is there any example of how to use SIO2timer in the tutorials or meditation source code? I can't find anything.

And what does the SIO2timercallback stand for? (I don't really understand the meaning of timer callback, i know what it means in french but.. Rom, can you translate? Razz) I think it's a function that is called when the timer is over but I can't get it to work so mayby it's not for that.. Razz
avatar
IanLinart

Posts : 26
Join date : 2009-08-12
Age : 29
Location : Montréal

View user profile http://iapps.linart.qc.ca

Back to top Go down

Re: How does the SIO2timer works

Post  sio2interactive on Wed Sep 09, 2009 3:26 pm

You have to specify to evaluate them... (same as for sensors) in the sio2ResourceRender mask:

SIO2_EVALUATE_SENSOR
SIO2_EVALUATE_TIMER


Cheers,

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: How does the SIO2timer works

Post  uprise78 on Wed Sep 09, 2009 3:28 pm

Look at sio2TimerCreate... SIO2timercallback is the function that will get called and it will be called every time _interval is elapsed. Thats all there is to it. If you view the source it is very small and simple.

uprise78

Posts : 228
Join date : 2008-10-31

View user profile

Back to top Go down

Re: How does the SIO2timer works

Post  IanLinart on Wed Sep 09, 2009 4:00 pm

Ok I manage to get it working (I was calling SIO2timerPlay in my render function Rolling Eyes )

But the int interval is in what? i set it to like 600 and it calls callback a little more than one second after I started the timer..
avatar
IanLinart

Posts : 26
Join date : 2009-08-12
Age : 29
Location : Montréal

View user profile http://iapps.linart.qc.ca

Back to top Go down

Re: How does the SIO2timer works

Post  Francescu on Wed Sep 09, 2009 5:17 pm

IanLinart wrote:Ok I manage to get it working (I was calling SIO2timerPlay in my render function Rolling Eyes )

But the int interval is in what? i set it to like 600 and it calls callback a little more than one second after I started the timer..

Milliseconds (1000 = 1s)
At least that's how it works for me and it is accurate.

Francescu

Posts : 136
Join date : 2009-03-18

View user profile

Back to top Go down

Re: How does the SIO2timer works

Post  IanLinart on Wed Sep 09, 2009 5:20 pm

Francescu wrote:
IanLinart wrote:Ok I manage to get it working (I was calling SIO2timerPlay in my render function Rolling Eyes )

But the int interval is in what? i set it to like 600 and it calls callback a little more than one second after I started the timer..

Milliseconds (1000 = 1s)
At least that's how it works for me and it is accurate.

Thanks
avatar
IanLinart

Posts : 26
Join date : 2009-08-12
Age : 29
Location : Montréal

View user profile http://iapps.linart.qc.ca

Back to top Go down

Re: How does the SIO2timer works

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum