Open
Description
There are several elements in FlxObject
that have x
and y
properties, such as velocity
, acceleration
, drag
and maxVelocity
to name a few. They are all instances of FlxPoint
, which totally makes sense.
The position of a FlxObject
, however, is represented by two different Number
properties. If they were represented by FlxPoint
like everything else, checking the distance between two objetcs or sprites would be as easy as a.position.distance(b.position)
.
I suggest adding a position:FlxPoint
property to FlxObject
, turning the current x
and y
properties into getters/setters.