Cocos Creator
手册文档
API 参考
Cocos Creator 3D
手册文档
API 参考
Cocos2d-x
手册文档
API 参考
Version: 3.1
Version: 3.5
Version: 3.4
Version: 3.3
Version: 3.2
Version: 3.0
Version: 2.4
Version: 2.3
Version: 2.2
Version: 2.1
Version: 2.0
Version: 1.10
Version: 1.9
Search
Preparing search index...
The search index is not available
CocosCreatorAPI
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
core
CallbackTimer
Class CallbackTimer
Hierarchy
CallbackTimer
Index
Constructors
constructor
Properties
_callback
_delay
_elapsed
_interval
_lock
_repeat
_run
Forever
_scheduler
_target
_times
Executed
_use
Delay
_timers
Methods
cancel
get
Callback
get
Interval
init
With
Callback
set
Interval
trigger
update
get
put
Constructors
constructor
new
Callback
Timer
(
)
:
CallbackTimer
Returns
CallbackTimer
Properties
Private
_callback
_callback
:
any
Private
_delay
_delay
:
number
Private
_elapsed
_elapsed
:
number
Private
_interval
_interval
:
number
Private
_lock
_lock
:
boolean
Private
_repeat
_repeat
:
number
Private
_run
Forever
_run
Forever
:
boolean
Private
_scheduler
_scheduler
:
any
Private
_target
_target
:
ISchedulable
|
null
Private
_times
Executed
_times
Executed
:
number
Private
_use
Delay
_use
Delay
:
boolean
Static
_timers
_timers
:
any
= []
Methods
cancel
cancel
(
)
:
void
Returns
void
get
Callback
get
Callback
(
)
:
any
Returns
any
get
Interval
get
Interval
(
)
:
number
Returns
number
returns interval of timer
init
With
Callback
init
With
Callback
(
scheduler
:
any
, callback
:
any
, target
:
ISchedulable
, seconds
:
number
, repeat
:
number
, delay
:
number
)
:
boolean
Parameters
scheduler:
any
callback:
any
target:
ISchedulable
seconds:
number
repeat:
number
delay:
number
Returns
boolean
set
Interval
set
Interval
(
interval
:
any
)
:
void
以秒为单位设置时间间隔
Parameters
interval:
any
Returns
void
trigger
trigger
(
)
:
void
Returns
void
update
update
(
dt
:
number
)
:
void
计时更新函数,用来触发计时器
Parameters
dt:
number
delta time
Returns
void
Static
get
get
(
)
:
any
Returns
any
Static
put
put
(
timer
:
any
)
:
void
Parameters
timer:
any
Returns
void
Globals
core
Callback
Timer
constructor
_callback
_delay
_elapsed
_interval
_lock
_repeat
_run
Forever
_scheduler
_target
_times
Executed
_use
Delay
_timers
cancel
get
Callback
get
Interval
init
With
Callback
set
Interval
trigger
update
get
put
Generated using
TypeDoc