C# Класс 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.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Cameras List
Position FlxPoint

Открытые методы

Метод Описание
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.

Описание методов

FlxBasic() публичный Метод

Instantiate the basic flixel object.
public FlxBasic ( ) : System
Результат System

destroy() публичный Метод

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
Результат void

draw() публичный Метод

Override this function to control how the object is drawn. Overriding draw() is rarely necessary, but can be very useful.
public draw ( ) : void
Результат void

drawDebug() публичный Метод

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.
Результат void

kill() публичный Метод

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
Результат void

postUpdate() публичный Метод

Post-update is called right after update() on each object in the game loop.
public postUpdate ( ) : void
Результат void

preUpdate() публичный Метод

Pre-update is called right before update() on each object in the game loop.
public preUpdate ( ) : void
Результат void

revive() публичный Метод

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
Результат void

toString() публичный Метод

Convert object to readable string name. Useful for debugging, save games, etc.
public toString ( ) : string
Результат string

update() публичный Метод

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
Результат void

Описание свойств

Cameras публичное свойство

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
Результат List

Position публичное свойство

flx# only - Internal position reference, safest if left untouched!
public FlxPoint,flxSharp.flxSharp Position
Результат FlxPoint