FlxTimer on HaxeFlixel 4.0

52 views
Skip to first unread message

LuFe_Mas

unread,
Mar 23, 2016, 9:14:52 PM3/23/16
to HaxeFlixel
I am updating my game to haxeflixel 4.0.
I am getting several error.

I am stuck on FlxTimer now.

Before my function was:

var nTimer = new FlxTimer(1, backInTimeByTimer, 1);



 
private function backInTimeByTimer( timer:Flxtimer):Void{
 backInTime
();
 
}


Now i do not even know how to start. The FlxTimer has no constructor now.

What I must do?

LuFe_Mas

unread,
Mar 23, 2016, 11:01:55 PM3/23/16
to HaxeFlixel
Maybe this is not the answer because i yet could not compile everything without error, but I think that is this:

 var nTimer = new FlxTimer();
 nTimer
.start(1, backInTimeByTimer, 1);

Will Blanton

unread,
Mar 24, 2016, 4:42:23 AM3/24/16
to HaxeFlixel
you can use:

var nTimer = new FlxTimer().start(1, backInTimeByTimer, 1);
Reply all
Reply to author
Forward
0 new messages