You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I was not planning to break the API because the x and y properties would still be there, both internally getting position.x and posision.y.
Version 3.0 will definitely break the API since several classes have been moved into new packages. That's the reason why we bumped the version number from 2.58 to 3.0.
There are several elements in
FlxObject
that havex
andy
properties, such asvelocity
,acceleration
,drag
andmaxVelocity
to name a few. They are all instances ofFlxPoint
, which totally makes sense.The position of a
FlxObject
, however, is represented by two differentNumber
properties. If they were represented byFlxPoint
like everything else, checking the distance between two objetcs or sprites would be as easy asa.position.distance(b.position)
.I suggest adding a
position:FlxPoint
property toFlxObject
, turning the currentx
andy
properties into getters/setters.The text was updated successfully, but these errors were encountered: