IgeInterval and IgeTimeout For Engine-Based Timers

Get the latest news on new features, bug fixes and version updates right here!

IgeInterval and IgeTimeout For Engine-Based Timers

Postby rob » Mon Nov 04, 2013 7:46 pm

I've updated the engine's dev branch to include the new IgeInterval and IgeTimeout classes.

Interval Usage:

Code: Select all
var a = new IgeInterval(function () { console.log('I get called every second'); }, 1000);

Timeout Usage:

Code: Select all
var a = new IgeTimeout(function () { console.log('I get called once after a second'); }, 1000);

Cancel a Timer:

Code: Select all
a.cancel();

Available now on the dev branch version 1.3.1.

The timers also respond to the engine's pause so if the engine is paused, the timers are too:

Code: Select all
ige.pause(true);

Will pause the whole simulation and the timers.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Re: IgeInterval and IgeTimeout For Engine-Based Timers

Postby dnasello » Tue Nov 05, 2013 9:51 pm

rob does this push still include the mobile fix you made me so that i can make tile maps to top left corner of screen? i was just going to make a class for this for my countdown timer so i can start testing this week =)
dnasello
 
Posts: 41
Joined: Wed Oct 23, 2013 9:44 pm

Re: IgeInterval and IgeTimeout For Engine-Based Timers

Postby rob » Tue Nov 05, 2013 9:58 pm

dnasello wrote:rob does this push still include the mobile fix you made me so that i can make tile maps to top left corner of screen? i was just going to make a class for this for my countdown timer so i can start testing this week =)

Yup!
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Re: IgeInterval and IgeTimeout For Engine-Based Timers

Postby dnasello » Wed Nov 06, 2013 5:44 pm

thanks a bunch
dnasello
 
Posts: 41
Joined: Wed Oct 23, 2013 9:44 pm


Return to New Features, Latest Versions & General Updates

Who is online

Users browsing this forum: No registered users and 1 guest
cron