Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
SchedulerScriptHandlerEntry Class Reference

The SchedulerScriptHandlerEntry is used to store the handler corresponding to the Lua function pointer and assign the handler a unique id like ScriptHandlerEntry. More...

Inherits ScriptHandlerEntry.

Public Member Functions

virtual ~SchedulerScriptHandlerEntry ()
 Destructor of SchedulerScriptHandlerEntry.
 
TimerScriptHandler * getTimer (void)
 Get the pointer of TimerScriptHandler object. More...
 
bool isPaused (void)
 Get the flag whether paused or not. More...
 
void markedForDeletion (void)
 Set the markedForDeletion flag true.
 
bool isMarkedForDeletion (void)
 Get the flag whether markedForDeletion or not. More...
 
- Public Member Functions inherited from ScriptHandlerEntry
virtual ~ScriptHandlerEntry ()
 Destructor of ScriptHandlerEntry.
 
int getHandler (void)
 Get the handler corresponding to the Lua function pointer. More...
 
int getEntryId (void)
 Get the unique id corresponding to the handler. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
local retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor.
 

Static Public Member Functions

static
SchedulerScriptHandlerEntry
create (int handler, float interval, bool paused)
 create a SchedulerScriptHandlerEntry object. More...
 
- Static Public Member Functions inherited from ScriptHandlerEntry
static ScriptHandlerEntrycreate (int handler)
 create a ScriptHandlerEntry instance by the handler. More...
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

Detailed Description

The SchedulerScriptHandlerEntry is used to store the handler corresponding to the Lua function pointer and assign the handler a unique id like ScriptHandlerEntry.

Meanwhile,create a timer that named TimerScriptHandler to execute the Lua function corresponding to the handler in the interval time if the SchedulerScriptHandlerEntry object isn't paused.

Member Function Documentation

static
SchedulerScriptHandlerEntry*
create
( int  handler,
float  interval,
bool  paused 
)
static

create a SchedulerScriptHandlerEntry object.

the index corresponding to the Lua function pointer. the interval to execute the Lua function. If the value is 0, then the lua function will be scheduled every frame. if paused is true, then the timer won't be started until it is resumed. a SchedulerScriptHandlerEntry object.

TimerScriptHandler* getTimer ( void  )
inline

Get the pointer of TimerScriptHandler object.

the pointer of TimerScriptHandler object.

bool isPaused ( void  )
inline

Get the flag whether paused or not.

the flag whether paused or not.

bool isMarkedForDeletion ( void  )
inline

Get the flag whether markedForDeletion or not.

the flag whether markedForDeletion or not.


The documentation for this class was generated from the following file: