Update README.md
This commit is contained in:
12
README.md
12
README.md
@@ -15,13 +15,11 @@ let core = new es.Core(768, 1366);
|
|||||||
2. 派发核心事件
|
2. 派发核心事件
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
// 在监听每帧更新时间处执行 egret写法:
|
// 必须派发该事件 否则核心内所有更新事件将不会执行 egret写法:
|
||||||
es.Time.update(egret.getTimer());
|
es.Core.emitter.emit(es.CoreEvents.FrameUpdated, egret.getTimer());
|
||||||
// 在监听每帧更新时间处执行 laya写法:
|
|
||||||
// laya 使用 Laya.timer.frameLoop 进行侦听
|
// 必须派发该事件 否则核心内所有更新事件将不会执行 laya写法:
|
||||||
// es.Time.update(Laya.systemTimer.currTimer);
|
// es.Core.emitter.emit(es.CoreEvents.FrameUpdated, Laya.systemTimer.currTimer);
|
||||||
// 必须派发该事件 否则核心内所有更新事件将不会执行
|
|
||||||
es.Core.emitter.emit(es.CoreEvents.FrameUpdated);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. 创建主场景
|
3. 创建主场景
|
||||||
|
|||||||
Reference in New Issue
Block a user