A simple performance monitor widget, for use in the debugger overlay.

Static variables

@:value(1)staticinlineread onlyDECIMALS:Int = 1

@:value(0xaaffffff)staticinlineread onlyLABEL_COLOR:FlxColor = 0xaaffffff

@:value(11)staticinlineread onlyTEXT_SIZE:Int = 11

Constructor

new()

Creates a new window with fps and memory graphs, as well as other useful stats for debugging.

Methods

activeObjects(Count:Int):Void

How many objects were updated.

Parameters:

Count

How many objects were updated.

inlinecurrentFps():Float

Calculates current game fps.

inlinecurrentMem():Float

Current RAM consumption.

destroy():Void

Clean up memory.

drawCalls(Drawcalls:Int):Void

How many times drawTiles() method was called.

Parameters:

Count

How many times drawTiles() method was called.

flixelDraw(Time:Int):Void

How long rendering took.

Parameters:

Time

How long this render took.

flixelUpdate(Time:Int):Void

How long updates took.

Parameters:

Time

How long this update took.

inlineintervalTime():Float

Time since performance monitoring started.

onFocus():Void

Re-enables tracking of the stats.

onFocusLost():Void

Pauses tracking of the stats.

start():Void

Starts Stats window update logic

stop():Void

Stops Stats window

update():Void

Called each frame, but really only updates once every second or so, to save on performance. Takes all the data in the accumulators and parses it into useful performance data.

visibleObjects(Count:Int):Void

How many objects were rendered.

Parameters:

Count

How many objects were rendered.

Inherited Variables

Defined by Window

Defined by Sprite

@:flash.propertybuttonMode:Bool

@:flash.propertyread onlydropTarget:DisplayObject

@:flash.propertyread onlygraphics:Graphics

@:flash.propertyhitArea:Sprite

@:flash.propertyuseHandCursor:Bool

Defined by DisplayObjectContainer

@:flash.propertymouseChildren:Bool

@:flash.propertyread onlynumChildren:Int

@:flash.propertytabChildren:Bool

@:flash.propertyread onlytextSnapshot:TextSnapshot

Defined by InteractiveObject

@:flash.propertycontextMenu:ContextMenu

@:flash.propertydoubleClickEnabled:Bool

@:flash.propertyfocusRect:Dynamic

@:flash.propertymouseEnabled:Bool

@:flash.property@:require(flash11)needsSoftKeyboard:Bool

@:flash.property@:require(flash11)softKeyboardInputAreaOfInterest:Rectangle

@:flash.propertytabEnabled:Bool

@:flash.propertytabIndex:Int

Defined by DisplayObject

@:flash.propertyalpha:Float

@:flash.propertyblendMode:BlendMode

@:flash.property@:require(flash10)write onlyblendShader:Shader

@:flash.propertycacheAsBitmap:Bool

@:flash.propertycacheAsBitmapMatrix:Matrix

@:flash.propertyfilters:Array<BitmapFilter>

@:flash.propertyheight:Float

@:flash.propertyread onlyloaderInfo:LoaderInfo

@:flash.propertymask:DisplayObject

@:flash.propertyread onlymouseX:Float

@:flash.propertyread onlymouseY:Float

@:flash.propertyname:String

@:flash.propertyopaqueBackground:Null<UInt>

@:flash.propertyread onlyparent:DisplayObjectContainer

@:flash.propertyread onlyroot:DisplayObject

@:flash.propertyrotation:Float

@:flash.property@:require(flash10)rotationX:Float

@:flash.property@:require(flash10)rotationY:Float

@:flash.property@:require(flash10)rotationZ:Float

@:flash.propertyscale9Grid:Rectangle

@:flash.propertyscaleX:Float

@:flash.propertyscaleY:Float

@:flash.property@:require(flash10)scaleZ:Float

@:flash.propertyscrollRect:Rectangle

@:flash.propertyshader:Shader

@:flash.propertyread onlystage:Stage

@:flash.propertytransform:Transform

@:flash.propertyvisible:Bool

@:flash.propertywidth:Float

@:flash.propertyx:Float

@:flash.propertyy:Float

@:flash.property@:require(flash10)z:Float

Inherited Methods

Defined by Window

bound():Void

Keep the window within the pre-specified bounding rectangle.

inlineputOnTop():Void

reposition(X:Float, Y:Float):Void

Change the position of the window. Subject to pre-specified bounding rectangles.

Parameters:

X

Desired X position of top left corner of the window.

Y

Desired Y position of top left corner of the window.

resize(Width:Float, Height:Float):Void

Resize the window. Subject to pre-specified minimums, maximums, and bounding rectangles.

Parameters:

Width

How wide to make the window.

Height

How tall to make the window.

Defined by Sprite

@:value({ bounds : null, lockCenter : false })startDrag(lockCenter:Bool = false, ?bounds:Null<Rectangle>):Void

@:value({ bounds : null, lockCenter : false })@:require(flash10_1)startTouchDrag(touchPointID:Int, lockCenter:Bool = false, ?bounds:Null<Rectangle>):Void

@:require(flash10_1)stopTouchDrag(touchPointID:Int):Void

Defined by DisplayObjectContainer

Defined by InteractiveObject

@:require(flash11)requestSoftKeyboard():Bool

Defined by DisplayObject

getBounds(targetCoordinateSpace:DisplayObject):Rectangle

getRect(targetCoordinateSpace:DisplayObject):Rectangle

@:require(flash10)globalToLocal3D(point:Point):Vector3D

@:value({ shapeFlag : false })hitTestPoint(x:Float, y:Float, shapeFlag:Bool = false):Bool

@:require(flash10)local3DToGlobal(point3d:Vector3D):Point

Defined by EventDispatcher

@:value({ useWeakReference : false, priority : 0, useCapture : false })addEventListener<T>(type:EventType<T>, listener:T ‑> Void, useCapture:Bool = false, priority:Int = 0, useWeakReference:Bool = false):Void

@:value({ useCapture : false })removeEventListener<T>(type:EventType<T>, listener:T ‑> Void, useCapture:Bool = false):Void