Flixel Forums

development => releases => Topic started by: Titch on Sun, Jul 10, 2011

Title: FlxTimer modification for easier callbacks
Post by: Titch on Sun, Jul 10, 2011
Whilst porting my project from 2.x to 2.5 (an epic undertaking given that I had been working on if for a few months already) I made a little change to the FlxTimer code since the callback was really irritating me since it would cause crashes at runtime.

The change I made was in FlxTimer at line 87, which now looks like this.
Code: [Select]
if (_callback != null)
{
if (_callback.length == 1)_callback(this);
else _callback();

}
Title: Re: FlxTimer modification for easier callbacks
Post by: datorum on Thu, Oct 27, 2011
thx, noted the same thing, for some reason the callback function gets a parameter passed...