MovieClipOverlayCameraBehaviour


Description

The MovieClipOverlayCameraBehaviour allows rendering DisplayObjects to the screen.

DisplayObjects can be attached to the stage and will appear overlayed in the scene. For rendering with non-othrographic camera its advisable to create a second camera with the MovieClipOverlayCameraBehaviour attached.


Functions

Awake

Initialises overlays and instances the mesh renderer.

OnStart

Behaviour state event.

OnUpdate

Frame update handler, renders the scene and handles user input etc.

OnPostRender

Doesnt the actual screen mesh generation for rendering.

renderFrame

Renders one frame of the active movieclip and advances the timeline.


Variables

overlayCameraName

Default camera to use for MovieClipOverlayCameraBehaviour.instance

enableKeyboard

Set keyboard input enabled

enableMouse

Set to allow mouse or keyboard interaction.

enableMouseOver

Set mouse over interactions.

multitouch

Enable multiple touch events otherwise the first touch down event will only be used.

fps

Target framerate to render the MovieClip timeline.

colorTransform

Stage color transform.

player

Active MovieClip player instance.

stage

Active Stage instance.

gfxGenerator

Active mesh generator.

stageScale

Stage scale.

syncStageScalePerFrame

Sync MovieClipOverlayCameraBehaviour.stageScale to the scale.scaleX/y per frame.

processInputOnUpdate

Process user input every Update, false will process every swf frame.

instance

Singleton instance access.

currentFrame

Get or set the current frame on the active MovieClip's timeline.


Inherited members

Functions

OnStart

Behaviour state event.

Update

Behaviour update.

OnUpdate

Update event, called once per frame.

OnDestroy

Internal destroy handler.

OnDestroyBehiavour

Destroy event.

SetState

Set the next state.

SetState

Set the next state with delay.

UpdateSleep

Schedule the next Update() or StateName() update for n seconds from now.

GetStateName

Get the active state name.

IsStateActive

Compare state name to the active one.

GetStateTime

Get the active state run time in seconds.

GetStateTimeMs

Get the active state run time in milliseconds.

RemoveComponent

Remove component by name.

AddComponent

Add component by name


Variables

userData

Associate user data with this behaviour.