Open Dovyski opened 9 years ago
I will at least agree that I've found that property odd for some time.
The actual change is fairly simple, all things considered. Are we now 3.0 and okay with breaking API?
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.
... Deprecation warnings?
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.