class Console
package flixel.system.debug.console
extends Window › Sprite › DisplayObjectContainer › InteractiveObject › DisplayObject › EventDispatcher
A powerful console for the flixel debugger screen with supports custom commands, registering objects and functions and saves the last 25 commands used. Inspired by Eric Smith's "CoolConsole".
See also:
Constructor
Variables
objectStack:Array<FlxObject> = []
Internal helper var containing all the FlxObjects created via the create command.
registeredFunctions:Map<String, Dynamic> = new Map<String,Dynamic>()
Map containing all registered Functions. You can use registerFunction() or add them directly to this map.
registeredHelp:Map<String, String> = new Map<String,String>()
Map containing all registered help text. Set these values from registerObject() or registerFunction().
registeredObjects:Map<String, Dynamic> = new Map<String,Dynamic>()
Map containing all registered Objects. You can use registerObject() or add them directly to this map.
Methods
inlineregisterClass(c:Class<Dynamic>):Void
Register a new class to use in any command.
Parameters:
c | The class to register. |
---|
inlineregisterEnum(e:Enum<Dynamic>):Void
Register a new enum to use in any command.
Parameters:
e | The enum to register. |
---|
4.4.0
.registerFunction(alias:String, func:Dynamic, ?helpText:String):Void
Register a new function to use in any command.
Parameters:
alias | The name with which you want to access the function. |
---|---|
func | The function to register. |
helpText | An optional string to trace to the console using the "help" command. |
registerObject(alias:String, object:Dynamic):Void
Register a new object to use in any command.
Parameters:
alias | The name with which you want to access the object. |
---|---|
object | The object to register. |
removeByAlias(alias:String):Void
Removes an object or function from the command registry.
Parameters:
alias | The alias to remove. |
---|
5.4.0
.inlineremoveClass(c:Class<Dynamic>):Void
Removes a class from the command registry.
Parameters:
c | The class to remove. |
---|
5.4.0
.inlineremoveEnum(e:Enum<Dynamic>):Void
Removes an enum from the command registry.
Parameters:
e | The enum to remove. |
---|
5.4.0
.removeFunction(func:Dynamic):Void
Removes a function from the command registry by searching through the list.
Note: removeByAlias
is more performant.
Parameters:
func | The object to remove. |
---|
5.4.0
.removeObject(object:Dynamic):Void
Removes an object from the command registry by searching through the list.
Note: removeByAlias
is more performant.
Parameters:
object | The object to remove. |
---|
5.4.0
.