FlixelCommunity / flixel

Community fork of Adam “Atomic” Saltsman's popular game engine Flixel. Distilled from a variety of Flash games he worked on over the last couple years, including Gravity Hook, Fathom and Canabalt, its primary function is to provide some useful base classes that you can extend to make your own game objects.
http://flixelcommunity.org/
Other
84 stars 17 forks source link

Move static constants on path following from FlxObject to FlxPath #218

Closed Dovyski closed 9 years ago

Dovyski commented 10 years ago

The old PATH_ prefix no longer makes sense, so it was dropped, e.g. FlxObject.PATH_FORWARD is now FlxPath.FORWARD.

Fix: #112

IQAndreas commented 10 years ago

Great!

I realize they are only static constants, but do you want to add redirects from the old location to the new one just to assist people learning the new locations? Like this: https://github.com/FlixelCommunity/flixel/blob/dev/src/flixel/util/FlxU.as#L397

Though, the code needs to be modified slightly for constants (it's actually a getter that looks like a constant, I love how you can do that in AS3):

/**
* Path behavior controls: move from the start of the path to the end then stop.
* 
* @deprecated This property is deprecated. Use <code>FlxPath.FORWARD()</code> instead.
*/
static public function get PATH_FORWARD():uint
{
    FlxG.warnDeprecated('FlxObject.PATH_FORWARD', 'FlxPath.FORWARD');
    return FlxPath.FORWARD;
}
Dovyski commented 10 years ago

Sure! I forgot about that. As soon as I have some time I will add them.

Dovyski commented 9 years ago

I've added the deprecate warnings and tested the code. It looks good to me. It's good to merge.