hexonaut / haxe-phaser

Haxe externs for Phaser.
MIT License
51 stars 9 forks source link

Easing.hx: Linear has no field None and Quadratic has no field InOut #27

Closed plicatibu closed 10 years ago

plicatibu commented 10 years ago

The errors presented __phaser.tween.Class has no field None__

The original sample from Phaser - sprites: spritesheet:

game.add.tween(sprite).to({ x: game.width }, 10000, Phaser.Easing.Linear.None, true);

Haxe code:

game.add.tween(sprite).to({ x: game.width }, 10000, Linear.None, true);

Error phaser.tween.Class has no field InOut

The original sample from Phaser - animation: multiple anims:

game.add.tween(purpleFish).to({ x: -200 }, 7500, Phaser.Easing.Quadratic.InOut, true, 0, 1000, false);

Haxe code:

game.add.tween(purpleFish).to({ x: -200 }, 7500, Quadratic.InOut, true, 0, 1000, false);

Inspecting Easing.hx we can see that Linear class have None function and that Quadratic has InOut function.

The problem seems to be caused because the parameters are not optional on functions. I believe that all other functions will suffer with the same problem.