fix code completion bug
This commit is contained in:
@@ -89,15 +89,15 @@ loop();
|
||||
返回触摸事件的最小时间间隔。
|
||||
|
||||
### events.onTouch(listener)
|
||||
* listener \<Function\> 参数为(x, y)的函数
|
||||
* listener \<Function\> 参数为Point的函数
|
||||
|
||||
注册一个触摸监听函数。
|
||||
|
||||
例如:
|
||||
```
|
||||
events.observeTouch();
|
||||
events.onTouch(function(x, y){
|
||||
log(x + ", " + y);
|
||||
events.onTouch(function(p){
|
||||
log(p.x + ", " + p.y);
|
||||
});
|
||||
events.loop();
|
||||
```
|
||||
@@ -106,21 +106,6 @@ events.loop();
|
||||
|
||||
删除所有事件监听函数。
|
||||
|
||||
### events.setTimeout(callback, delay)
|
||||
* callback \<Function\> 回调函数
|
||||
* delay \<Number\> 延迟
|
||||
|
||||
延迟大约delay毫秒后执行callback。该函数只有在events.loop()被使用时才有效。
|
||||
|
||||
返回一个整数表示这个设置的timeout, 可由clearTimeout取消。
|
||||
|
||||
|
||||
### events.clearTimeout(id)
|
||||
|
||||
* id \<Number\> 由 setTimeout() 返回的 ID 值。该值标识要取消的延迟执行回调。
|
||||
|
||||
取消由 setTimeout() 方法设置的 timeout。
|
||||
|
||||
### key事件
|
||||
|
||||
当有按键被按下或弹起时会触发该事件。
|
||||
|
||||
Reference in New Issue
Block a user