C# Class flxSharp.flxSharp.FlxBasic

This is a useful "generic" Flixel object. Both FlxObject and FlxGroup extend this class, as do the plugins. Has no size, position or graphical data.
Exibir arquivo Open project: jlorek/flxSharp

Public Properties

Property Type Description
Cameras List
Position FlxPoint

Public Methods

Method Description
FlxBasic ( ) : System

Instantiate the basic flixel object.

destroy ( ) : void

Override this function to null out variables or manually call destroy() on class members if necessary. Don't forget to call super.destroy()!

draw ( ) : void

Override this function to control how the object is drawn. Overriding draw() is rarely necessary, but can be very useful.

drawDebug ( FlxCamera camera = null ) : void

Override this function to draw custom "debug mode" graphics to the specified camera while the debugger's visual mode is toggled on.

kill ( ) : void

Handy function for "killing" game objects. 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.

postUpdate ( ) : void

Post-update is called right after update() on each object in the game loop.

preUpdate ( ) : void

Pre-update is called right before update() on each object in the game loop.

revive ( ) : void

Handy function for bringing game objects "back to life". Just sets alive and exists back to true. In practice, this function is most often called by FlxObject.reset().

toString ( ) : string

Convert object to readable string name. Useful for debugging, save games, etc.

update ( ) : void

Override this function to update your class's position and appearance. This is where most of your game rules and behavioral code will go.

Method Details

FlxBasic() public method

Instantiate the basic flixel object.
public FlxBasic ( ) : System
return System

destroy() public method

Override this function to null out variables or manually call destroy() on class members if necessary. Don't forget to call super.destroy()!
public destroy ( ) : void
return void

draw() public method

Override this function to control how the object is drawn. Overriding draw() is rarely necessary, but can be very useful.
public draw ( ) : void
return void

drawDebug() public method

Override this function to draw custom "debug mode" graphics to the specified camera while the debugger's visual mode is toggled on.
public drawDebug ( FlxCamera camera = null ) : void
camera FlxCamera Which camera to draw the debug visuals to.
return void

kill() public method

Handy function for "killing" game objects. 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.
public kill ( ) : void
return void

postUpdate() public method

Post-update is called right after update() on each object in the game loop.
public postUpdate ( ) : void
return void

preUpdate() public method

Pre-update is called right before update() on each object in the game loop.
public preUpdate ( ) : void
return void

revive() public method

Handy function for bringing game objects "back to life". Just sets alive and exists back to true. In practice, this function is most often called by FlxObject.reset().
public revive ( ) : void
return void

toString() public method

Convert object to readable string name. Useful for debugging, save games, etc.
public toString ( ) : string
return string

update() public method

Override this function to update your class's position and appearance. This is where most of your game rules and behavioral code will go.
public update ( ) : void
return void

Property Details

Cameras public_oe property

An array of camera objects that this object will use during draw(). This value will initialize itself during the first draw to automatically point at the main camera list out in FlxG unless you already set it. You can also change it afterward too, very flexible!
public List Cameras
return List

Position public_oe property

flx# only - Internal position reference, safest if left untouched!
public FlxPoint,flxSharp.flxSharp Position
return FlxPoint