2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Director
|
2014-07-02 10:15:26 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Pauses the running scene.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- The running scene will be _drawed_ but all scheduled timers will be paused.<br>
|
|
|
|
-- While paused, the draw rate will be 4 FPS to reduce CPU consumption.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] pause
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2016-10-28 10:13:57 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Clones a projection matrix and put it to the top of projection matrix stack.<br>
|
|
|
|
-- param index The index of projection matrix stack.<br>
|
|
|
|
-- js NA
|
|
|
|
-- @function [parent=#Director] pushProjectionMatrix
|
|
|
|
-- @param self
|
2017-02-08 10:42:18 +08:00
|
|
|
-- @param #unsigned long index
|
2016-10-28 10:13:57 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Pops the top matrix of the projection matrix stack.<br>
|
|
|
|
-- param index The index of projection matrix stack.<br>
|
|
|
|
-- js NA
|
|
|
|
-- @function [parent=#Director] popProjectionMatrix
|
|
|
|
-- @param self
|
2017-02-08 10:42:18 +08:00
|
|
|
-- @param #unsigned long index
|
2016-10-28 10:13:57 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
|
|
|
|
2014-06-25 17:17:16 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the EventDispatcher associated with this director.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- since v3.0<br>
|
|
|
|
-- js NA
|
2014-06-25 17:17:16 +08:00
|
|
|
-- @function [parent=#Director] setEventDispatcher
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.EventDispatcher dispatcher
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-06-25 17:17:16 +08:00
|
|
|
|
2016-10-28 10:13:57 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Adds an identity matrix to the top of projection matrix stack.<br>
|
|
|
|
-- param index The index of projection matrix stack.<br>
|
|
|
|
-- js NA
|
|
|
|
-- @function [parent=#Director] loadProjectionIdentityMatrix
|
|
|
|
-- @param self
|
2017-02-08 10:42:18 +08:00
|
|
|
-- @param #unsigned long index
|
2016-10-28 10:13:57 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-11-05 13:44:02 +08:00
|
|
|
-- The size in pixels of the surface. It could be different than the screen size.<br>
|
|
|
|
-- High-res devices might have a higher surface size than the screen size.<br>
|
|
|
|
-- Only available when compiled using SDK >= 4.0.<br>
|
|
|
|
-- since v0.99.4
|
|
|
|
-- @function [parent=#Director] setContentScaleFactor
|
2014-04-28 15:01:59 +08:00
|
|
|
-- @param self
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @param #float scaleFactor
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2017-11-23 16:06:18 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#Director] getDeltaTime
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets content scale factor.<br>
|
|
|
|
-- see Director::setContentScaleFactor()
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getContentScaleFactor
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the size of the OpenGL view in pixels.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getWinSizeInPixels
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
2014-04-28 15:01:59 +08:00
|
|
|
--------------------------------
|
2017-11-23 16:06:18 +08:00
|
|
|
-- Returns safe area rectangle of the OpenGL view in points.
|
|
|
|
-- @function [parent=#Director] getSafeAreaRect
|
2014-04-28 15:01:59 +08:00
|
|
|
-- @param self
|
2017-11-23 16:06:18 +08:00
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the OpenGL default values.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- It will enable alpha blending, disable depth test.<br>
|
|
|
|
-- js NA
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setGLDefaultValues
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the ActionManager associated with this director.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- since v2.0
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setActionManager
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.ActionManager actionManager
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Enables/disables OpenGL alpha blending.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setAlphaBlending
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool on
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Pops out all scenes from the stack until the root scene in the queue.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- This scene will replace the running one.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Internally it will call `popToSceneStackLevel(1)`.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] popToRootScene
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-04-28 15:01:59 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Adds a matrix to the top of specified type of matrix stack.<br>
|
|
|
|
-- param type Matrix type.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- param mat The matrix that to be added.<br>
|
|
|
|
-- js NA
|
2014-04-28 15:01:59 +08:00
|
|
|
-- @function [parent=#Director] loadMatrix
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int type
|
|
|
|
-- @param #mat4_table mat
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-04-28 15:01:59 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- This object will be visited after the main scene is visited.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- This object MUST implement the "visit" function.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Useful to hook a notification object, like Notifications (http:github.com/manucorporat/CCNotifications)<br>
|
|
|
|
-- since v0.99.5
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getNotificationNode
|
|
|
|
-- @param self
|
|
|
|
-- @return Node#Node ret (return value: cc.Node)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the size of the OpenGL view in points.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getWinSize
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 16:29:09 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getTextureCache
|
|
|
|
-- @param self
|
|
|
|
-- @return TextureCache#TextureCache ret (return value: cc.TextureCache)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Whether or not the replaced scene will receive the cleanup message.<br>
|
|
|
|
-- If the new scene is pushed, then the old scene won't receive the "cleanup" message.<br>
|
|
|
|
-- If the new scene replaces the old one, the it will receive the "cleanup" message.<br>
|
|
|
|
-- since v0.99.0
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] isSendCleanupToScene
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns visible origin coordinate of the OpenGL view in points.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getVisibleOrigin
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2017-05-23 10:17:48 +08:00
|
|
|
-- @overload self, float
|
|
|
|
-- @overload self
|
|
|
|
-- @function [parent=#Director] mainLoop
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2017-05-23 10:17:48 +08:00
|
|
|
-- @param #float dt
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2017-05-23 10:17:48 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Enables/disables OpenGL depth test.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setDepthTest
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool on
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 16:29:09 +08:00
|
|
|
-- Gets Frame Rate.<br>
|
|
|
|
-- js NA
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getFrameRate
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Get seconds per frame.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getSecondsPerFrame
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2014-11-05 13:44:02 +08:00
|
|
|
--------------------------------
|
2015-09-22 17:23:14 +08:00
|
|
|
-- Clear all types of matrix stack, and add identity matrix to these matrix stacks.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- js NA
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @function [parent=#Director] resetMatrixStack
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-11-05 13:44:02 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Converts an OpenGL coordinate to a screen coordinate.<br>
|
|
|
|
-- Useful to convert node points to window points for calls such as glScissor.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] convertToUI
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table point
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-11-05 13:44:02 +08:00
|
|
|
--------------------------------
|
2015-03-19 16:29:09 +08:00
|
|
|
-- Clones a specified type matrix and put it to the top of specified type of matrix stack.<br>
|
|
|
|
-- js NA
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @function [parent=#Director] pushMatrix
|
|
|
|
-- @param self
|
|
|
|
-- @param #int type
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-11-05 13:44:02 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the default values based on the Configuration info.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setDefaultValues
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] init
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the Scheduler associated with this director.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- since v2.0
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setScheduler
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Scheduler scheduler
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2016-10-28 10:13:57 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Multiplies a matrix to the top of projection matrix stack.<br>
|
|
|
|
-- param mat The matrix that to be multiplied.<br>
|
|
|
|
-- param index The index of projection matrix stack.<br>
|
|
|
|
-- js NA
|
|
|
|
-- @function [parent=#Director] multiplyProjectionMatrix
|
|
|
|
-- @param self
|
|
|
|
-- @param #mat4_table mat
|
2017-02-08 10:42:18 +08:00
|
|
|
-- @param #unsigned long index
|
2016-10-28 10:13:57 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
|
|
|
|
2014-12-30 11:52:26 +08:00
|
|
|
--------------------------------
|
2015-03-19 16:29:09 +08:00
|
|
|
-- Gets the top matrix of specified type of matrix stack.<br>
|
|
|
|
-- js NA
|
2014-12-30 11:52:26 +08:00
|
|
|
-- @function [parent=#Director] getMatrix
|
|
|
|
-- @param self
|
|
|
|
-- @param #int type
|
|
|
|
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
|
|
|
|
2016-08-19 09:36:50 +08:00
|
|
|
--------------------------------
|
|
|
|
-- returns whether or not the Director is in a valid state
|
|
|
|
-- @function [parent=#Director] isValid
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- The main loop is triggered again.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Call this function only if [stopAnimation] was called earlier.<br>
|
|
|
|
-- warning Don't call this function to start the main loop. To run the main loop call runWithScene.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] startAnimation
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-27 14:55:35 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Get the GLView.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- lua NA
|
2014-03-27 14:55:35 +08:00
|
|
|
-- @function [parent=#Director] getOpenGLView
|
|
|
|
-- @param self
|
|
|
|
-- @return GLView#GLView ret (return value: cc.GLView)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets current running Scene. Director can only run one Scene at a time.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getRunningScene
|
|
|
|
-- @param self
|
|
|
|
-- @return Scene#Scene ret (return value: cc.Scene)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the glViewport.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setViewport
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.<br>
|
|
|
|
-- If you don't want to pause your animation call [pause] instead.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] stopAnimation
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Pops out all scenes from the stack until it reaches `level`.<br>
|
|
|
|
-- If level is 0, it will end the director.<br>
|
|
|
|
-- If level is 1, it will pop all scenes until it reaches to root scene.<br>
|
|
|
|
-- If level is <= than the current stack level, it won't do anything.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] popToSceneStackLevel
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int level
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Resumes the paused scene.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- The scheduled timers will be activated again.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- The "delta time" will be 0 (as if the game wasn't paused).
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] resume
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Whether or not `_nextDeltaTimeZero` is set to 0.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] isNextDeltaTimeZero
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-12-24 17:41:09 +08:00
|
|
|
--------------------------------
|
2015-03-19 16:29:09 +08:00
|
|
|
-- Sets clear values for the color buffers,<br>
|
|
|
|
-- value range of each element is [0.0, 1.0].<br>
|
|
|
|
-- js NA
|
2014-12-24 17:41:09 +08:00
|
|
|
-- @function [parent=#Director] setClearColor
|
|
|
|
-- @param self
|
|
|
|
-- @param #color4f_table clearColor
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-12-24 17:41:09 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Ends the execution, releases the running scene.<br>
|
|
|
|
-- lua endToLua
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] end
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the GLView. <br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- lua NA
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setOpenGLView
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.GLView openGLView
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Converts a screen coordinate to an OpenGL coordinate.<br>
|
|
|
|
-- Useful to convert (multi) touch coordinates to the current layout (portrait or landscape).
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] convertToGL
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table point
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Removes all cocos2d cached data.<br>
|
|
|
|
-- It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache<br>
|
|
|
|
-- since v0.99.3
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] purgeCachedData
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- How many frames were called since the director started
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getTotalFrames
|
|
|
|
-- @param self
|
|
|
|
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Enters the Director's main loop with the given Scene.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Call it to run only your FIRST scene.<br>
|
|
|
|
-- Don't call it if there is already a running scene.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- It will call pushScene: and then it will call startAnimation<br>
|
|
|
|
-- js NA
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] runWithScene
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Scene scene
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the notification node.<br>
|
|
|
|
-- see Director::getNotificationNode()
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setNotificationNode
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Node node
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Draw the scene.<br>
|
|
|
|
-- This method is called every frame. Don't call it manually.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] drawScene
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-04-28 15:01:59 +08:00
|
|
|
--------------------------------
|
2015-03-19 16:29:09 +08:00
|
|
|
--
|
2014-12-30 11:52:26 +08:00
|
|
|
-- @function [parent=#Director] restart
|
2014-04-28 15:01:59 +08:00
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-04-28 15:01:59 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Pops out a scene from the stack.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- This scene will replace the running one.<br>
|
|
|
|
-- The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.<br>
|
|
|
|
-- ONLY call it if there is a running scene.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] popScene
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-11-05 13:44:02 +08:00
|
|
|
--------------------------------
|
2015-09-22 17:23:14 +08:00
|
|
|
-- Adds an identity matrix to the top of specified type of matrix stack.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- js NA
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @function [parent=#Director] loadIdentityMatrix
|
|
|
|
-- @param self
|
|
|
|
-- @param #int type
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-11-05 13:44:02 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-09-09 10:23:01 +08:00
|
|
|
-- Whether or not displaying the FPS on the bottom-left corner of the screen.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] isDisplayStats
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets OpenGL projection.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setProjection
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @param #int projection
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-11-05 13:44:02 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the Console associated with this director.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- since v3.0<br>
|
|
|
|
-- js NA
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @function [parent=#Director] getConsole
|
|
|
|
-- @param self
|
|
|
|
-- @return Console#Console ret (return value: cc.Console)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-09-22 17:23:14 +08:00
|
|
|
-- Multiplies a matrix to the top of specified type of matrix stack.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- param type Matrix type.<br>
|
2015-09-22 17:23:14 +08:00
|
|
|
-- param mat The matrix that to be multiplied.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- js NA
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @function [parent=#Director] multiplyMatrix
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int type
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @param #mat4_table mat
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-09-09 10:23:01 +08:00
|
|
|
-- Gets the distance between camera and near clipping frame.<br>
|
|
|
|
-- It is correct for default camera that near clipping frame is same as the screen.
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @function [parent=#Director] getZEye
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @return float#float ret (return value: float)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-09-22 17:23:14 +08:00
|
|
|
-- Sets the delta time between current frame and next frame is 0.<br>
|
|
|
|
-- This value will be used in Schedule, and will affect all functions that are using frame delta time, such as Actions.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- This value will take effect only one time.
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @function [parent=#Director] setNextDeltaTimeZero
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @param #bool nextDeltaTimeZero
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-04-28 15:01:59 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 16:29:09 +08:00
|
|
|
-- Pops the top matrix of the specified type of matrix stack.<br>
|
|
|
|
-- js NA
|
2014-04-28 15:01:59 +08:00
|
|
|
-- @function [parent=#Director] popMatrix
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int type
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns visible size of the OpenGL view in points.<br>
|
|
|
|
-- The value is equal to `Director::getWinSize()` if don't invoke `GLView::setDesignResolutionSize()`.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getVisibleSize
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
2016-10-28 10:13:57 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Adds a matrix to the top of projection matrix stack.<br>
|
|
|
|
-- param mat The matrix that to be added.<br>
|
|
|
|
-- param index The index of projection matrix stack.<br>
|
|
|
|
-- js NA
|
|
|
|
-- @function [parent=#Director] loadProjectionMatrix
|
|
|
|
-- @param self
|
|
|
|
-- @param #mat4_table mat
|
2017-02-08 10:42:18 +08:00
|
|
|
-- @param #unsigned long index
|
2016-10-28 10:13:57 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Init the projection matrix stack.<br>
|
|
|
|
-- param stackCount The size of projection matrix stack.<br>
|
|
|
|
-- js NA
|
|
|
|
-- @function [parent=#Director] initProjectionMatrixStack
|
|
|
|
-- @param self
|
2017-02-08 10:42:18 +08:00
|
|
|
-- @param #unsigned long stackCount
|
2016-10-28 10:13:57 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets the Scheduler associated with this director.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- since v2.0
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getScheduler
|
|
|
|
-- @param self
|
|
|
|
-- @return Scheduler#Scheduler ret (return value: cc.Scheduler)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Suspends the execution of the running scene, pushing it on the stack of suspended scenes.<br>
|
2014-11-05 13:44:02 +08:00
|
|
|
-- The new scene will be executed.<br>
|
|
|
|
-- Try to avoid big stacks of pushed scenes to reduce memory allocation. <br>
|
|
|
|
-- ONLY call it if there is a running scene.
|
|
|
|
-- @function [parent=#Director] pushScene
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @param #cc.Scene scene
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets the FPS value.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getAnimationInterval
|
|
|
|
-- @param self
|
2015-07-06 16:29:03 +08:00
|
|
|
-- @return float#float ret (return value: float)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Whether or not the Director is paused.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] isPaused
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-09-09 10:23:01 +08:00
|
|
|
-- Display the FPS on the bottom-left corner of the screen.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] setDisplayStats
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool displayStats
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-06-25 17:17:16 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets the EventDispatcher associated with this director.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- since v3.0<br>
|
|
|
|
-- js NA
|
2014-06-25 17:17:16 +08:00
|
|
|
-- @function [parent=#Director] getEventDispatcher
|
|
|
|
-- @param self
|
|
|
|
-- @return EventDispatcher#EventDispatcher ret (return value: cc.EventDispatcher)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Replaces the running scene with a new one. The running scene is terminated.<br>
|
2015-03-19 16:29:09 +08:00
|
|
|
-- ONLY call it if there is a running scene.<br>
|
|
|
|
-- js NA
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] replaceScene
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Scene scene
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-09-09 10:23:01 +08:00
|
|
|
-- Sets the FPS value. FPS = 1/interval.
|
2014-11-05 13:44:02 +08:00
|
|
|
-- @function [parent=#Director] setAnimationInterval
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-07-06 16:29:03 +08:00
|
|
|
-- @param #float interval
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Director#Director self (return value: cc.Director)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets the ActionManager associated with this director.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- since v2.0
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getActionManager
|
|
|
|
-- @param self
|
|
|
|
-- @return ActionManager#ActionManager ret (return value: cc.ActionManager)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 16:29:09 +08:00
|
|
|
-- Returns a shared instance of the director. <br>
|
|
|
|
-- js _getInstance
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Director] getInstance
|
|
|
|
-- @param self
|
|
|
|
-- @return Director#Director ret (return value: cc.Director)
|
|
|
|
|
|
|
|
return nil
|