Class that creates and handles the main Window and manages how and when to execute the Scenes. More...
#include <CCDirector.h>
Public Types | |
enum | Projection { _2D, _3D, CUSTOM, DEFAULT = _3D } |
Possible OpenGL projections used by director. More... | |
Public Member Functions | |
Director () | |
ctor () | |
Director () | |
virtual | ~Director () |
virtual bool | init () |
var | init () |
local | init () |
Scene * | getRunningScene () |
Gets current running Scene. More... | |
var | getRunningScene () |
Gets current running Scene. More... | |
local | getRunningScene () |
Gets current running Scene. More... | |
double | getAnimationInterval () |
Gets the FPS value. More... | |
var | getAnimationInterval () |
Gets the FPS value. More... | |
local | getAnimationInterval () |
Gets the FPS value. More... | |
virtual void | setAnimationInterval (double interval)=0 |
Sets the FPS value. More... | |
local | setAnimationInterval ( local interval) |
Sets the FPS value. More... | |
bool | isDisplayStats () |
Whether or not to display the FPS on the bottom-left corner. More... | |
var | isDisplayStats () |
Whether or not to display the FPS on the bottom-left corner. More... | |
local | isDisplayStats () |
Whether or not to display the FPS on the bottom-left corner. More... | |
void | setDisplayStats (bool displayStats) |
Display the FPS on the bottom-left corner. More... | |
var | setDisplayStats ( var displayStats) |
Display the FPS on the bottom-left corner. More... | |
local | setDisplayStats ( local displayStats) |
Display the FPS on the bottom-left corner. More... | |
float | getSecondsPerFrame () |
Get seconds per frame. More... | |
var | getSecondsPerFrame () |
Get seconds per frame. More... | |
local | getSecondsPerFrame () |
Get seconds per frame. More... | |
GLView * | getOpenGLView () |
Get the GLView. More... | |
var | getOpenGLView () |
Get the GLView. More... | |
void | setOpenGLView (GLView *openGLView) |
Sets the GLView. More... | |
var | setOpenGLView ( var openGLView) |
Sets the GLView. More... | |
TextureCache * | getTextureCache () const |
bool | isNextDeltaTimeZero () |
Whether or not _nextDeltaTimeZero is set to 0. More... | |
var | isNextDeltaTimeZero () |
Whether or not _nextDeltaTimeZero is set to 0. More... | |
local | isNextDeltaTimeZero () |
Whether or not _nextDeltaTimeZero is set to 0. More... | |
void | setNextDeltaTimeZero (bool nextDeltaTimeZero) |
Sets the detal time between current frame and next frame is 0. More... | |
bool | isPaused () |
Whether or not the Director is paused. More... | |
unsigned int | getTotalFrames () |
How many frames were called since the director started. More... | |
local | getTotalFrames () |
How many frames were called since the director started. More... | |
Projection | getProjection () |
Gets an OpenGL projection. More... | |
var | getProjection () |
Gets an OpenGL projection. More... | |
void | setProjection (Projection projection) |
Sets OpenGL projection. More... | |
void | setViewport () |
Sets the glViewport. More... | |
var | setViewport () |
Sets the glViewport. More... | |
local | setViewport () |
Sets the glViewport. More... | |
bool | isSendCleanupToScene () |
How many frames were called since the director started. More... | |
local | isSendCleanupToScene () |
How many frames were called since the director started. More... | |
Node * | getNotificationNode () const |
This object will be visited after the main scene is visited. More... | |
var | getNotificationNode () |
This object will be visited after the main scene is visited. More... | |
local | getNotificationNode () |
This object will be visited after the main scene is visited. More... | |
void | setNotificationNode (Node *node) |
Sets the notification node. More... | |
const Size & | getWinSize () const |
Returns the size of the OpenGL view in points. More... | |
var | getWinSize () |
Returns the size of the OpenGL view in points. More... | |
local | getWinSize () |
Returns the size of the OpenGL view in points. More... | |
Size | getWinSizeInPixels () const |
Returns the size of the OpenGL view in pixels. More... | |
var | getWinSizeInPixels () |
Returns the size of the OpenGL view in pixels. More... | |
local | getWinSizeInPixels () |
Returns the size of the OpenGL view in pixels. More... | |
Size | getVisibleSize () const |
Returns visible size of the OpenGL view in points. More... | |
var | getVisibleSize () |
Returns visible size of the OpenGL view in points. More... | |
local | getVisibleSize () |
Returns visible size of the OpenGL view in points. More... | |
Vec2 | getVisibleOrigin () const |
Returns visible origin coordinate of the OpenGL view in points. More... | |
Vec2 | convertToGL (const Vec2 &point) |
Converts a screen coordinate to an OpenGL coordinate. More... | |
Vec2 | convertToUI (const Vec2 &point) |
Converts an OpenGL coordinate to a screen coordinate. More... | |
float | getZEye () const |
Gets the distance between camera and near clipping frane. More... | |
void | runWithScene (Scene *scene) |
Enters the Director's main loop with the given Scene. More... | |
local | runWithScene ( local scene) |
Enters the Director's main loop with the given Scene. More... | |
void | pushScene (Scene *scene) |
Suspends the execution of the running scene, pushing it on the stack of suspended scenes. More... | |
void | popScene () |
Pops out a scene from the stack. More... | |
void | popToRootScene () |
Pops out all scenes from the stack until the root scene in the queue. More... | |
void | popToSceneStackLevel (int level) |
Pops out all scenes from the stack until it reaches level . More... | |
var | popToSceneStackLevel ( var level) |
Pops out all scenes from the stack until it reaches level . More... | |
local | popToSceneStackLevel ( local level) |
Pops out all scenes from the stack until it reaches level . More... | |
void | replaceScene (Scene *scene) |
Replaces the running scene with a new one. More... | |
void | end () |
Ends the execution, releases the running scene. More... | |
void | pause () |
Pauses the running scene. More... | |
var | pause () |
Pauses the running scene. More... | |
local | pause () |
Pauses the running scene. More... | |
void | resume () |
Resumes the paused scene. More... | |
void | restart () |
virtual void | stopAnimation ()=0 |
Stops the animation. More... | |
local | stopAnimation () |
Stops the animation. More... | |
virtual void | startAnimation ()=0 |
The main loop is triggered again. More... | |
var | startAnimation () |
The main loop is triggered again. More... | |
local | startAnimation () |
The main loop is triggered again. More... | |
void | drawScene () |
Draw the scene. More... | |
var | drawScene () |
Draw the scene. More... | |
local | drawScene () |
Draw the scene. More... | |
void | purgeCachedData () |
Removes all cocos2d cached data. More... | |
void | setDefaultValues () |
Sets the default values based on the Configuration info. More... | |
var | setDefaultValues () |
Sets the default values based on the Configuration info. More... | |
local | setDefaultValues () |
Sets the default values based on the Configuration info. More... | |
void | setGLDefaultValues () |
Sets the OpenGL default values. More... | |
local | setGLDefaultValues () |
Sets the OpenGL default values. More... | |
void | setAlphaBlending (bool on) |
Enables/disables OpenGL alpha blending. More... | |
var | setAlphaBlending ( var on) |
Enables/disables OpenGL alpha blending. More... | |
local | setAlphaBlending ( local on) |
Enables/disables OpenGL alpha blending. More... | |
void | setClearColor (const Color4F &clearColor) |
Sets clear values for the color buffers, value range of each element is [0.0, 1.0]. More... | |
local | setClearColor ( local clearColor) |
Sets clear values for the color buffers, value range of each element is [0.0, 1.0]. More... | |
void | setDepthTest (bool on) |
Enables/disables OpenGL depth test. More... | |
virtual void | mainLoop ()=0 |
void | setContentScaleFactor (float scaleFactor) |
The size in pixels of the surface. More... | |
var | setContentScaleFactor ( var scaleFactor) |
The size in pixels of the surface. More... | |
local | setContentScaleFactor ( local scaleFactor) |
The size in pixels of the surface. More... | |
float | getContentScaleFactor () const |
Gets content scale factor. More... | |
var | getContentScaleFactor () |
Gets content scale factor. More... | |
local | getContentScaleFactor () |
Gets content scale factor. More... | |
Scheduler * | getScheduler () const |
Gets the Scheduler associated with this director. More... | |
local | getScheduler () |
Gets the Scheduler associated with this director. More... | |
void | setScheduler (Scheduler *scheduler) |
Sets the Scheduler associated with this director. More... | |
var | setScheduler ( var scheduler) |
Sets the Scheduler associated with this director. More... | |
local | setScheduler ( local scheduler) |
Sets the Scheduler associated with this director. More... | |
ActionManager * | getActionManager () const |
Gets the ActionManager associated with this director. More... | |
var | getActionManager () |
Gets the ActionManager associated with this director. More... | |
local | getActionManager () |
Gets the ActionManager associated with this director. More... | |
void | setActionManager (ActionManager *actionManager) |
Sets the ActionManager associated with this director. More... | |
var | setActionManager ( var actionManager) |
Sets the ActionManager associated with this director. More... | |
local | setActionManager ( local actionManager) |
Sets the ActionManager associated with this director. More... | |
EventDispatcher * | getEventDispatcher () const |
Gets the EventDispatcher associated with this director. More... | |
local | getEventDispatcher () |
Gets the EventDispatcher associated with this director. More... | |
void | setEventDispatcher (EventDispatcher *dispatcher) |
Sets the EventDispatcher associated with this director. More... | |
local | setEventDispatcher ( local dispatcher) |
Sets the EventDispatcher associated with this director. More... | |
Renderer * | getRenderer () const |
Returns the Renderer associated with this director. More... | |
var | getRenderer () |
Returns the Renderer associated with this director. More... | |
local | getRenderer () |
Returns the Renderer associated with this director. More... | |
Console * | getConsole () const |
Returns the Console associated with this director. More... | |
local | getConsole () |
Returns the Console associated with this director. More... | |
float | getDeltaTime () const |
var | getDeltaTime () |
local | getDeltaTime () |
float | getFrameRate () const |
Gets Frame Rate. More... | |
local | getFrameRate () |
Gets Frame Rate. More... | |
void | pushMatrix (MATRIX_STACK_TYPE type) |
Clones a specified type matrix and put it to the top of specified type of matrix stack. More... | |
local | pushMatrix ( local type) |
Clones a specified type matrix and put it to the top of specified type of matrix stack. More... | |
void | popMatrix (MATRIX_STACK_TYPE type) |
Pops the top matrix of the specified type of matrix stack. More... | |
void | loadIdentityMatrix (MATRIX_STACK_TYPE type) |
Adds an identity matrix to the top of specified type of matrxi stack. More... | |
void | loadMatrix (MATRIX_STACK_TYPE type, const Mat4 &mat) |
Adds a matrix to the top of specified type of matrix stack. More... | |
local | loadMatrix ( local type, local mat) |
Adds a matrix to the top of specified type of matrix stack. More... | |
void | multiplyMatrix (MATRIX_STACK_TYPE type, const Mat4 &mat) |
Multipies a matrix to the top of specified type of matrix stack. More... | |
const Mat4 & | getMatrix (MATRIX_STACK_TYPE type) |
Gets the top matrix of specified type of matrix stack. More... | |
void | resetMatrixStack () |
Cleras all types of matrix stack, and add indentity matrix to these matrix stacks. More... | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
Static Public Member Functions | |
static Director * | getInstance () |
Returns a shared instance of the director. More... | |
var | _getInstance () |
Returns a shared instance of the director. More... | |
local | getInstance () |
Returns a shared instance of the director. More... | |
static Director * | sharedDirector () |
local | sharedDirector () |
Static Public Attributes | |
static const char * | EVENT_PROJECTION_CHANGED |
Director will trigger an event when projection type is changed. More... | |
static const char * | EVENT_AFTER_UPDATE |
Director will trigger an event after Schedule::update() is invoked. More... | |
var | EVENT_AFTER_UPDATE |
Director will trigger an event after Schedule::update() is invoked. More... | |
local | EVENT_AFTER_UPDATE |
Director will trigger an event after Schedule::update() is invoked. More... | |
static const char * | EVENT_AFTER_VISIT |
Director will trigger an event after Scene::render() is invoked. More... | |
var | EVENT_AFTER_VISIT |
Director will trigger an event after Scene::render() is invoked. More... | |
local | EVENT_AFTER_VISIT |
Director will trigger an event after Scene::render() is invoked. More... | |
static const char * | EVENT_AFTER_DRAW |
Director will trigger an event after a scene is drawn, the data is sent to GPU. More... | |
var | EVENT_AFTER_DRAW |
Director will trigger an event after a scene is drawn, the data is sent to GPU. More... | |
local | EVENT_AFTER_DRAW |
Director will trigger an event after a scene is drawn, the data is sent to GPU. More... | |
Protected Member Functions | |
void | reset () |
var | reset () |
local | reset () |
void | purgeDirector () |
var | purgeDirector () |
local | purgeDirector () |
void | restartDirector () |
var | restartDirector () |
local | restartDirector () |
void | setNextScene () |
var | setNextScene () |
local | setNextScene () |
void | showStats () |
var | showStats () |
local | showStats () |
void | createStatsLabel () |
var | createStatsLabel () |
local | createStatsLabel () |
void | calculateMPF () |
var | calculateMPF () |
local | calculateMPF () |
void | getFPSImageData (unsigned char **datapointer, ssize_t *length) |
var | getFPSImageData ( var datapointer, var length) |
local | getFPSImageData ( local datapointer, local length) |
void | calculateDeltaTime () |
calculates delta time since last time it was called More... | |
var | calculateDeltaTime () |
calculates delta time since last time it was called More... | |
local | calculateDeltaTime () |
calculates delta time since last time it was called More... | |
void | initTextureCache () |
void | destroyTextureCache () |
var | destroyTextureCache () |
local | destroyTextureCache () |
void | initMatrixStack () |
var | initMatrixStack () |
local | initMatrixStack () |
Protected Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Ref () | |
Constructor. More... | |
Friends | |
class | GLView |
Class that creates and handles the main Window and manages how and when to execute the Scenes.
The Director is also responsible for:
Since the Director is a singleton, the standard way to use it is by calling: _ Director::getInstance()->methodName();
Director | ( | ) |
var ctor | ( | ) |
local Director | ( | ) |
|
virtual |
|
protected |
calculates delta time since last time it was called
|
protected |
calculates delta time since last time it was called
|
protected |
calculates delta time since last time it was called
|
protected |
|
protected |
|
protected |
Converts a screen coordinate to an OpenGL coordinate.
Useful to convert (multi) touch coordinates to the current layout (portrait or landscape).
var convertToGL | ( | var | point | ) |
Converts a screen coordinate to an OpenGL coordinate.
Useful to convert (multi) touch coordinates to the current layout (portrait or landscape).
local convertToGL | ( | local | point | ) |
Converts a screen coordinate to an OpenGL coordinate.
Useful to convert (multi) touch coordinates to the current layout (portrait or landscape).
Converts an OpenGL coordinate to a screen coordinate.
Useful to convert node points to window points for calls such as glScissor.
var convertToUI | ( | var | point | ) |
Converts an OpenGL coordinate to a screen coordinate.
Useful to convert node points to window points for calls such as glScissor.
local convertToUI | ( | local | point | ) |
Converts an OpenGL coordinate to a screen coordinate.
Useful to convert node points to window points for calls such as glScissor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void drawScene | ( | ) |
Draw the scene.
This method is called every frame. Don't call it manually.
var drawScene | ( | ) |
Draw the scene.
This method is called every frame. Don't call it manually.
local drawScene | ( | ) |
Draw the scene.
This method is called every frame. Don't call it manually.
void end | ( | ) |
Ends the execution, releases the running scene.
var end | ( | ) |
Ends the execution, releases the running scene.
local endToLua | ( | ) |
Ends the execution, releases the running scene.
|
inline |
Gets the ActionManager associated with this director.
|
inline |
Gets the ActionManager associated with this director.
|
inline |
Gets the ActionManager associated with this director.
|
inline |
Gets the FPS value.
|
inline |
Gets the FPS value.
|
inline |
Gets the FPS value.
|
inline |
Returns the Console associated with this director.
|
inline |
Returns the Console associated with this director.
|
inline |
Gets content scale factor.
|
inline |
Gets content scale factor.
|
inline |
Gets content scale factor.
float getDeltaTime | ( | ) | const |
var getDeltaTime | ( | ) |
local getDeltaTime | ( | ) |
|
inline |
Gets the EventDispatcher associated with this director.
|
inline |
Gets the EventDispatcher associated with this director.
|
protected |
|
protected |
|
protected |
|
inline |
Gets Frame Rate.
|
inline |
Gets Frame Rate.
|
static |
Returns a shared instance of the director.
|
static |
Returns a shared instance of the director.
|
static |
Returns a shared instance of the director.
const Mat4& getMatrix | ( | MATRIX_STACK_TYPE | type | ) |
Gets the top matrix of specified type of matrix stack.
local getMatrix | ( | local | type | ) |
Gets the top matrix of specified type of matrix stack.
|
inline |
This object will be visited after the main scene is visited.
This object MUST implement the "visit" function. Useful to hook a notification object, like Notifications (http://github.com/manucorporat/CCNotifications)
|
inline |
This object will be visited after the main scene is visited.
This object MUST implement the "visit" function. Useful to hook a notification object, like Notifications (http://github.com/manucorporat/CCNotifications)
|
inline |
This object will be visited after the main scene is visited.
This object MUST implement the "visit" function. Useful to hook a notification object, like Notifications (http://github.com/manucorporat/CCNotifications)
|
inline |
Get the GLView.
|
inline |
Gets an OpenGL projection.
|
inline |
Gets an OpenGL projection.
|
inline |
Returns the Renderer associated with this director.
|
inline |
Returns the Renderer associated with this director.
|
inline |
Returns the Renderer associated with this director.
|
inline |
|
inline |
|
inline |
|
inline |
Gets the Scheduler associated with this director.
|
inline |
Gets the Scheduler associated with this director.
|
inline |
Gets the Scheduler associated with this director.
|
inline |
Get seconds per frame.
|
inline |
Get seconds per frame.
|
inline |
Get seconds per frame.
TextureCache* getTextureCache | ( | ) | const |
var getTextureCache | ( | ) |
local getTextureCache | ( | ) |
|
inline |
How many frames were called since the director started.
|
inline |
How many frames were called since the director started.
|
inline |
How many frames were called since the director started.
Vec2 getVisibleOrigin | ( | ) | const |
Returns visible origin coordinate of the OpenGL view in points.
var getVisibleOrigin | ( | ) |
Returns visible origin coordinate of the OpenGL view in points.
local getVisibleOrigin | ( | ) |
Returns visible origin coordinate of the OpenGL view in points.
Size getVisibleSize | ( | ) | const |
Returns visible size of the OpenGL view in points.
The value is equal to Director::getWinSize()
if don't invoke GLView::setDesignResolutionSize()
.
var getVisibleSize | ( | ) |
Returns visible size of the OpenGL view in points.
The value is equal to Director::getWinSize()
if don't invoke GLView::setDesignResolutionSize()
.
local getVisibleSize | ( | ) |
Returns visible size of the OpenGL view in points.
The value is equal to Director::getWinSize()
if don't invoke GLView::setDesignResolutionSize()
.
const Size& getWinSize | ( | ) | const |
Returns the size of the OpenGL view in points.
var getWinSize | ( | ) |
Returns the size of the OpenGL view in points.
local getWinSize | ( | ) |
Returns the size of the OpenGL view in points.
Size getWinSizeInPixels | ( | ) | const |
Returns the size of the OpenGL view in pixels.
var getWinSizeInPixels | ( | ) |
Returns the size of the OpenGL view in pixels.
local getWinSizeInPixels | ( | ) |
Returns the size of the OpenGL view in pixels.
float getZEye | ( | ) | const |
Gets the distance between camera and near clipping frane.
It is correct for default camera that near clipping frane is the same as screen.
var getZEye | ( | ) |
Gets the distance between camera and near clipping frane.
It is correct for default camera that near clipping frane is the same as screen.
local getZEye | ( | ) |
Gets the distance between camera and near clipping frane.
It is correct for default camera that near clipping frane is the same as screen.
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
Whether or not to display the FPS on the bottom-left corner.
|
inline |
Whether or not to display the FPS on the bottom-left corner.
|
inline |
Whether or not to display the FPS on the bottom-left corner.
|
inline |
Whether or not _nextDeltaTimeZero
is set to 0.
|
inline |
Whether or not _nextDeltaTimeZero
is set to 0.
|
inline |
Whether or not _nextDeltaTimeZero
is set to 0.
|
inline |
Whether or not the Director is paused.
|
inline |
Whether or not the Director is paused.
|
inline |
Whether or not the Director is paused.
|
inline |
How many frames were called since the director started.
Whether or not the replaced scene will receive the cleanup message. If the new scene is pushed, then the old scene won't receive the "cleanup" message. If the new scene replaces the old one, the it will receive the "cleanup" message.
|
inline |
How many frames were called since the director started.
Whether or not the replaced scene will receive the cleanup message. If the new scene is pushed, then the old scene won't receive the "cleanup" message. If the new scene replaces the old one, the it will receive the "cleanup" message.
|
inline |
How many frames were called since the director started.
Whether or not the replaced scene will receive the cleanup message. If the new scene is pushed, then the old scene won't receive the "cleanup" message. If the new scene replaces the old one, the it will receive the "cleanup" message.
void loadIdentityMatrix | ( | MATRIX_STACK_TYPE | type | ) |
Adds an identity matrix to the top of specified type of matrxi stack.
local loadIdentityMatrix | ( | local | type | ) |
Adds an identity matrix to the top of specified type of matrxi stack.
void loadMatrix | ( | MATRIX_STACK_TYPE | type, |
const Mat4 & | mat | ||
) |
Adds a matrix to the top of specified type of matrix stack.
type | Matrix type. |
mat | The matrix that to be added. |
local loadMatrix | ( | local | type, |
local | mat | ||
) |
Adds a matrix to the top of specified type of matrix stack.
type | Matrix type. |
mat | The matrix that to be added. |
|
pure virtual |
Implemented in DisplayLinkDirector.
|
pure virtual |
Implemented in DisplayLinkDirector.
|
pure virtual |
Implemented in DisplayLinkDirector.
void multiplyMatrix | ( | MATRIX_STACK_TYPE | type, |
const Mat4 & | mat | ||
) |
Multipies a matrix to the top of specified type of matrix stack.
type | Matrix type. |
mat | The matrix that to be multipied. |
local multiplyMatrix | ( | local | type, |
local | mat | ||
) |
Multipies a matrix to the top of specified type of matrix stack.
type | Matrix type. |
mat | The matrix that to be multipied. |
void pause | ( | ) |
Pauses the running scene.
The running scene will be drawed but all scheduled timers will be paused. While paused, the draw rate will be 4 FPS to reduce CPU consumption.
var pause | ( | ) |
Pauses the running scene.
The running scene will be drawed but all scheduled timers will be paused. While paused, the draw rate will be 4 FPS to reduce CPU consumption.
local pause | ( | ) |
Pauses the running scene.
The running scene will be drawed but all scheduled timers will be paused. While paused, the draw rate will be 4 FPS to reduce CPU consumption.
void popMatrix | ( | MATRIX_STACK_TYPE | type | ) |
Pops the top matrix of the specified type of matrix stack.
local popMatrix | ( | local | type | ) |
Pops the top matrix of the specified type of matrix stack.
void popScene | ( | ) |
Pops out a scene from the stack.
This scene will replace the running one. The running scene will be deleted. If there are no more scenes in the stack the execution is terminated. ONLY call it if there is a running scene.
var popScene | ( | ) |
Pops out a scene from the stack.
This scene will replace the running one. The running scene will be deleted. If there are no more scenes in the stack the execution is terminated. ONLY call it if there is a running scene.
local popScene | ( | ) |
Pops out a scene from the stack.
This scene will replace the running one. The running scene will be deleted. If there are no more scenes in the stack the execution is terminated. ONLY call it if there is a running scene.
void popToRootScene | ( | ) |
Pops out all scenes from the stack until the root scene in the queue.
This scene will replace the running one. Internally it will call popToSceneStackLevel(1)
.
var popToRootScene | ( | ) |
Pops out all scenes from the stack until the root scene in the queue.
This scene will replace the running one. Internally it will call popToSceneStackLevel(1)
.
local popToRootScene | ( | ) |
Pops out all scenes from the stack until the root scene in the queue.
This scene will replace the running one. Internally it will call popToSceneStackLevel(1)
.
void popToSceneStackLevel | ( | int | level | ) |
Pops out all scenes from the stack until it reaches level
.
If level is 0, it will end the director. If level is 1, it will pop all scenes until it reaches to root scene. If level is <= than the current stack level, it won't do anything.
var popToSceneStackLevel | ( | var | level | ) |
Pops out all scenes from the stack until it reaches level
.
If level is 0, it will end the director. If level is 1, it will pop all scenes until it reaches to root scene. If level is <= than the current stack level, it won't do anything.
local popToSceneStackLevel | ( | local | level | ) |
Pops out all scenes from the stack until it reaches level
.
If level is 0, it will end the director. If level is 1, it will pop all scenes until it reaches to root scene. If level is <= than the current stack level, it won't do anything.
void purgeCachedData | ( | ) |
Removes all cocos2d cached data.
It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache
var purgeCachedData | ( | ) |
Removes all cocos2d cached data.
It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache
local purgeCachedData | ( | ) |
Removes all cocos2d cached data.
It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache
|
protected |
|
protected |
|
protected |
void pushMatrix | ( | MATRIX_STACK_TYPE | type | ) |
Clones a specified type matrix and put it to the top of specified type of matrix stack.
local pushMatrix | ( | local | type | ) |
Clones a specified type matrix and put it to the top of specified type of matrix stack.
void pushScene | ( | Scene * | scene | ) |
Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
The new scene will be executed. Try to avoid big stacks of pushed scenes to reduce memory allocation. ONLY call it if there is a running scene.
var pushScene | ( | var | scene | ) |
Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
The new scene will be executed. Try to avoid big stacks of pushed scenes to reduce memory allocation. ONLY call it if there is a running scene.
local pushScene | ( | local | scene | ) |
Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
The new scene will be executed. Try to avoid big stacks of pushed scenes to reduce memory allocation. ONLY call it if there is a running scene.
void replaceScene | ( | Scene * | scene | ) |
Replaces the running scene with a new one.
The running scene is terminated. ONLY call it if there is a running scene.
local replaceScene | ( | local | scene | ) |
Replaces the running scene with a new one.
The running scene is terminated. ONLY call it if there is a running scene.
|
protected |
|
protected |
|
protected |
void resetMatrixStack | ( | ) |
Cleras all types of matrix stack, and add indentity matrix to these matrix stacks.
local resetMatrixStack | ( | ) |
Cleras all types of matrix stack, and add indentity matrix to these matrix stacks.
void restart | ( | ) |
var restart | ( | ) |
local restart | ( | ) |
|
protected |
|
protected |
|
protected |
void resume | ( | ) |
Resumes the paused scene.
The scheduled timers will be activated again. The "delta time" will be 0 (as if the game wasn't paused).
var resume | ( | ) |
Resumes the paused scene.
The scheduled timers will be activated again. The "delta time" will be 0 (as if the game wasn't paused).
local resume | ( | ) |
Resumes the paused scene.
The scheduled timers will be activated again. The "delta time" will be 0 (as if the game wasn't paused).
void runWithScene | ( | Scene * | scene | ) |
local runWithScene | ( | local | scene | ) |
void setActionManager | ( | ActionManager * | actionManager | ) |
Sets the ActionManager associated with this director.
var setActionManager | ( | var | actionManager | ) |
Sets the ActionManager associated with this director.
local setActionManager | ( | local | actionManager | ) |
Sets the ActionManager associated with this director.
void setAlphaBlending | ( | bool | on | ) |
Enables/disables OpenGL alpha blending.
var setAlphaBlending | ( | var | on | ) |
Enables/disables OpenGL alpha blending.
local setAlphaBlending | ( | local | on | ) |
Enables/disables OpenGL alpha blending.
|
pure virtual |
|
pure virtual |
|
pure virtual |
void setClearColor | ( | const Color4F & | clearColor | ) |
Sets clear values for the color buffers, value range of each element is [0.0, 1.0].
local setClearColor | ( | local | clearColor | ) |
Sets clear values for the color buffers, value range of each element is [0.0, 1.0].
void setContentScaleFactor | ( | float | scaleFactor | ) |
The size in pixels of the surface.
It could be different than the screen size. High-res devices might have a higher surface size than the screen size. Only available when compiled using SDK >= 4.0.
var setContentScaleFactor | ( | var | scaleFactor | ) |
The size in pixels of the surface.
It could be different than the screen size. High-res devices might have a higher surface size than the screen size. Only available when compiled using SDK >= 4.0.
local setContentScaleFactor | ( | local | scaleFactor | ) |
The size in pixels of the surface.
It could be different than the screen size. High-res devices might have a higher surface size than the screen size. Only available when compiled using SDK >= 4.0.
void setDefaultValues | ( | ) |
Sets the default values based on the Configuration info.
var setDefaultValues | ( | ) |
Sets the default values based on the Configuration info.
local setDefaultValues | ( | ) |
Sets the default values based on the Configuration info.
void setDepthTest | ( | bool | on | ) |
Enables/disables OpenGL depth test.
var setDepthTest | ( | var | on | ) |
Enables/disables OpenGL depth test.
local setDepthTest | ( | local | on | ) |
Enables/disables OpenGL depth test.
|
inline |
Display the FPS on the bottom-left corner.
|
inline |
Display the FPS on the bottom-left corner.
|
inline |
Display the FPS on the bottom-left corner.
void setEventDispatcher | ( | EventDispatcher * | dispatcher | ) |
Sets the EventDispatcher associated with this director.
local setEventDispatcher | ( | local | dispatcher | ) |
Sets the EventDispatcher associated with this director.
void setGLDefaultValues | ( | ) |
Sets the OpenGL default values.
It will enable alpha blending, disable depth test.
local setGLDefaultValues | ( | ) |
Sets the OpenGL default values.
It will enable alpha blending, disable depth test.
void setNextDeltaTimeZero | ( | bool | nextDeltaTimeZero | ) |
Sets the detal time between current frame and next frame is 0.
This value will be used in Schedule, and will affect all functions that are using frame detal time, such as Actions. This value will take effect only one time.
var setNextDeltaTimeZero | ( | var | nextDeltaTimeZero | ) |
Sets the detal time between current frame and next frame is 0.
This value will be used in Schedule, and will affect all functions that are using frame detal time, such as Actions. This value will take effect only one time.
local setNextDeltaTimeZero | ( | local | nextDeltaTimeZero | ) |
Sets the detal time between current frame and next frame is 0.
This value will be used in Schedule, and will affect all functions that are using frame detal time, such as Actions. This value will take effect only one time.
|
protected |
|
protected |
|
protected |
void setNotificationNode | ( | Node * | node | ) |
Sets the notification node.
var setNotificationNode | ( | var | node | ) |
Sets the notification node.
local setNotificationNode | ( | local | node | ) |
Sets the notification node.
var setOpenGLView | ( | var | openGLView | ) |
Sets the GLView.
void setProjection | ( | Projection | projection | ) |
Sets OpenGL projection.
var setProjection | ( | var | projection | ) |
Sets OpenGL projection.
local setProjection | ( | local | projection | ) |
Sets OpenGL projection.
void setScheduler | ( | Scheduler * | scheduler | ) |
Sets the Scheduler associated with this director.
var setScheduler | ( | var | scheduler | ) |
Sets the Scheduler associated with this director.
local setScheduler | ( | local | scheduler | ) |
Sets the Scheduler associated with this director.
void setViewport | ( | ) |
Sets the glViewport.
var setViewport | ( | ) |
Sets the glViewport.
local setViewport | ( | ) |
Sets the glViewport.
|
inlinestatic |
|
inlinestatic |
|
protected |
|
protected |
|
protected |
|
pure virtual |
The main loop is triggered again.
Call this function only if [stopAnimation] was called earlier.
Implemented in DisplayLinkDirector.
|
pure virtual |
The main loop is triggered again.
Call this function only if [stopAnimation] was called earlier.
Implemented in DisplayLinkDirector.
|
pure virtual |
The main loop is triggered again.
Call this function only if [stopAnimation] was called earlier.
Implemented in DisplayLinkDirector.
|
pure virtual |
Stops the animation.
Nothing will be drawn. The main loop won't be triggered anymore. If you don't want to pause your animation call [pause] instead.
Implemented in DisplayLinkDirector.
|
pure virtual |
Stops the animation.
Nothing will be drawn. The main loop won't be triggered anymore. If you don't want to pause your animation call [pause] instead.
Implemented in DisplayLinkDirector.
|
pure virtual |
Stops the animation.
Nothing will be drawn. The main loop won't be triggered anymore. If you don't want to pause your animation call [pause] instead.
Implemented in DisplayLinkDirector.
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
ActionManager associated with this director.
|
protected |
ActionManager associated with this director.
|
protected |
ActionManager associated with this director.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
EventDispatcher associated with this director.
|
protected |
EventDispatcher associated with this director.
|
protected |
EventDispatcher associated with this director.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Whether or not the Director is paused.
|
protected |
Whether or not the Director is paused.
|
protected |
Whether or not the Director is paused.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Scheduler associated with this director.
|
protected |
Scheduler associated with this director.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Director will trigger an event after a scene is drawn, the data is sent to GPU.
|
static |
Director will trigger an event after a scene is drawn, the data is sent to GPU.
|
static |
Director will trigger an event after a scene is drawn, the data is sent to GPU.
|
static |
Director will trigger an event after Schedule::update() is invoked.
|
static |
Director will trigger an event after Schedule::update() is invoked.
|
static |
Director will trigger an event after Schedule::update() is invoked.
|
static |
Director will trigger an event after Scene::render() is invoked.
|
static |
Director will trigger an event after Scene::render() is invoked.
|
static |
Director will trigger an event after Scene::render() is invoked.
|
static |
Director will trigger an event when projection type is changed.
|
static |
Director will trigger an event when projection type is changed.
|
static |
Director will trigger an event when projection type is changed.