Basic Scene object, extend this to make a scene.

Constructor

new()

Initializes the assetQueue. Please don't override this, use init instead.

Variables

assetQueue:Array<RgAsset>

Current registered assets. only directly modify this if you know what you're doing, use register and unregister instead.

Methods

draw():Void

Runs every frame, calls draw on every asset by default.

init():Void

Does nothing by default, can be used to initialize and register your objects.

finalregister(asset:RgAsset):Void

CANNOT BE OVERRIDEN!

Used to add assets to the asset-queue

Parameters:

asset

The asset you want to add.

finalunload():Void

CANNOT BE OVERRIDEN!

Runs upon scene-switch. used to unload and free all the remaining resources.

finalunregister(asset:RgAsset):Void

CANNOT BE OVERRIDEN!

Used to remove assets from the asset-queue. Automatically calls unload.

Parameters:

asset

the asset to remove.

update():Void

Runs every frame, updates every asset by default.