scardoc;Timer

scardoc;Timer
Functions

 Timer_Add( Integer timerID, Real period )
 

向指定计时器添加一定量的时间。【功能:增加计时器时间】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (78) 

 Timer_Advance( Integer timerID, Real period )
 

将计时器推进指定的时间量。【功能:推进计时器】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (88) 

 Timer_Display( Integer timerID )
 

在控制台中显示指定计时器的剩余时间。【功能:控制台显示剩余时间】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (219) 

 Timer_DisplayOnScreen( Integer timerID )
 

在屏幕上显示计时器——需要定期调用(如每秒一次)以更新屏幕显示。这是一个临时函数,后续将获得正式UI支持。【功能:屏幕显示计时器】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (266) 

 Timer_End( Integer timerID )
 

停止指定的计时器。【功能:停止计时器】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (253) 

 Timer_Exists( Integer timerID )
 

返回指定ID的计时器是否存在。【功能:检查计时器是否存在】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (69) 

 Timer_GetElapsed( Integer timerID )
 

返回计时器启动以来已经过的时间。【功能:获取已过时间】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (158) 

 Timer_GetMinutesAndSeconds( Luafunction getTimeFunction, Integer TimerID )
 

返回两个值:分钟和秒。需传入如Timer_GetRemaining或Timer_GetElapsed之类的函数。【功能:获取分钟和秒】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (167) 

 Timer_GetRemaining( Integer timerID )
 

获取指定计时器的剩余时间。【功能:获取剩余时间】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (138) 

 Timer_IsPaused( Integer timerID )
 

检查计时器是否处于暂停状态。【功能:检查计时器是否暂停】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (119) 

 Timer_Pause( Integer timerID )
 

暂停指定的计时器。【功能:暂停计时器】

Pause and Resume calls are ref-counted: if you have called Pause *twice* on a timer, you will also need to call Resume twice in order to start the timer up again.

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (99) 

 Timer_Resume( Integer timerID, Boolean OPT_force )
 

恢复指定的计时器。【功能:恢复计时器】

Pause and Resume calls are ref-counted: if you have called Pause *twice* on a timer, you will also need to call Resume twice in order to start the timer up again. Set the force parameter to true if you want to bypass the refcounting and make sure a timer starts up again.

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (193) 

 Timer_Start( Integer timerID, Real period )
 

启动指定ID的计时器,参数为所需时长(以秒为单位)。【功能:启动计时器】

  Source: [E:\P4Share\engine\assets\engine\scar\timer.scar] (59)