Author Topic: v 1.27 - FlxCore getters/setters  (Read 1294 times)


  • Guest
v 1.27 - FlxCore getters/setters
« on: Wed, Dec 9, 2009 »
Hi Adam, this is more like a design suggestion and I hope you consider this simple change.

Right now you don't use any getters/setters in FlxCore (or any other classes). The thing is, once someone extends any of these classes it is impossible to override properties directly, but that can be solved by having getters/setters defined in the parent class.

That would open a lot of awesome possibilities and can make some game logic cleaner, like auto-tinting a FlxSprite according to a scrollFactor, auto-killing a FlxSprite once its x value is lower than N, etc...  what do you think?