playif / play_phaser

A Dart port for Phaser 2D game engine.
MIT License
71 stars 13 forks source link

type error if timer delay is an integer #14

Open ewot opened 9 years ago

ewot commented 9 years ago

The timer crashes with a type error when triggered if the given delay is an integer.

The property Timer._newTick should be a num or the calculated value should be converted to a double when updating it. Or the Timer.add() should take a double and not a num.

To reproduce:

timer = game.time.create();
TimerEvent te = timer.add(1000, () => print("timer called"));

This will crash after 1000ms with: type 'int' is not a subtype of type 'double' of 'value'.