Scene is the type of a root node in the scene graph. More...
Public Member Functions | |
Scene () | |
Scene constructor. | |
override void | OnEnter () |
This function gets called when the scene is started by the Director. | |
override void | OnExit () |
Scene's OnExit calls Cleanup() by default. | |
virtual bool | IsTransitionScene () |
Return true if the scene is of TransitionScene type. | |
Public Attributes | |
bool | NoClear = false |
Normally, the scene clears the screen in its internal render function. | |
float | DrawGridStep = -1.0f |
Cell size of the debug grid drawn when DebugFlags.DrawGrid is set in Director.Instance.DebugFlags. | |
float | DrawGridAutoStepMaxCells = 32 |
When DrawGridStep is set to -1, the debug grid cell size is calculated automatically. | |
Properties | |
double | SceneTime [get] |
The total time elapse since the scene started, in seconds. |
Scene is the type of a root node in the scene graph.
You can use the Director singleton to manipulate the scene stack, can the current scene can be accessed with Director.Instance.CurrentScene. Only one scene is active at a time, except during scene transition when 2 scenes might be active at the same time to allow blending.
Scene also holds the main Camera.
float DrawGridAutoStepMaxCells = 32 |
When DrawGridStep is set to -1, the debug grid cell size is calculated automatically.
The cell size increases in powers of 2 as you zoom out, in a way there are never more than DrawGridAutoStepMaxCells subdivisions along the longest axis viewed. Warning: increasing this value too much might cause too many lines to be drawn, and overflow the vertex array used in DrawHelpers'immediate mode. The debug grid stops being drawn if the automatically calculated step size is bigger than 2^15.
float DrawGridStep = -1.0f |
Cell size of the debug grid drawn when DebugFlags.DrawGrid is set in Director.Instance.DebugFlags.
When the value is -1.0f (the default) the debug grid cell size is automatically ajusted to never show more than DrawGridAutoStepMaxCells subdivisions along the longest axis viewed.
bool NoClear = false |
Normally, the scene clears the screen in its internal render function.
You can suppress this automatic clear by setting NoClear to true. Note that if you disable the automatic scene clear, some TransitionScene effects won't work properly (since some scene transitions need to render the 2 transitioned scenes offscreen to blend them).