class flixel.FlxBasic implements IFlxDestroyable
Available on all platforms
Sub classes | ||||||||||||||||||
![]() | AntTaskManager, FlxTileSpecial, FlxAsyncLoop, FlxTypedGroup, FlxPlugin, FlxSound, FlxCamera, FlxObject |
|
This is a useful "generic" Flixel object. Both FlxObject and * FlxGroup extend this class. Has no size, position or graphical data.
Class Fields
Instance Fields
IDs seem like they could be pretty useful, huh? * They're not actually used for anything yet though.
Useful state for many game objects - "dead" (!alive) vs alive. kill() and * revive() both flip this switch (along with exists, but you can override that).
var collisionType:FlxCollisionType
Enum that informs the collision system which type of object this is (to avoid expensive type casting).
This flag indicates whether this objects has been destroyed or not. * Cannot be set, use destroy() and revive().
WARNING: This will remove this object entirely. Use kill() if you want to disable it temporarily only and revive() it later. * Override this function to null out variables manually or call destroy() on class members if necessary. Don't forget to call super.destroy()!
Override this function to control how the object is drawn. * Overriding draw() is rarely necessary, but can be very useful.
Handy function for "killing" game objects. Use reset() to revive them. Default behavior is to flag them as nonexistent AND dead. However, if you want the * "corpse" to remain in the game, like to animate an effect or whatever, you should override this, setting only alive to false, and leaving exists true.