add events module, including EventEmiiter, KeyEvent, TouchEvent

This commit is contained in:
hyb1996
2017-07-20 15:39:17 +08:00
parent 1d23640362
commit 52cc5214f1
47 changed files with 755 additions and 82 deletions

View File

@@ -9,9 +9,7 @@ module.exports = function(__runtime__, scope){
scope.log(text);
}
scope.sleep = function(millis){
__runtime__.sleep(millis);
}
scope.sleep = __runtime__.sleep.bind(__runtime__);
scope.isStopped = function(){
return __runtime__.isStopped();