判断接口更改、新增FrameUpdated核心事件
This commit is contained in:
@@ -17,5 +17,5 @@ module es {
|
||||
}
|
||||
}
|
||||
|
||||
export var isIUpdatable = (props: any): props is IUpdatable => typeof (props as IUpdatable)['js'] !== 'undefined';
|
||||
export var isIUpdatable = (props: any): props is IUpdatable => typeof (props as IUpdatable)['update'] !== 'undefined';
|
||||
}
|
||||
@@ -31,6 +31,7 @@ module es {
|
||||
|
||||
Core._instance = this;
|
||||
Core.emitter = new Emitter<CoreEvents>();
|
||||
Core.emitter.addObserver(CoreEvents.FrameUpdated, this.update, this);
|
||||
|
||||
Core.registerGlobalManager(this._timerManager);
|
||||
|
||||
|
||||
@@ -12,5 +12,9 @@ module es {
|
||||
* 当设备方向改变时触发
|
||||
*/
|
||||
OrientationChanged,
|
||||
/**
|
||||
* 当每帧事件触发时
|
||||
*/
|
||||
FrameUpdated,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,11 +124,6 @@ module es {
|
||||
}
|
||||
|
||||
public render() {
|
||||
if (this._renderers.length == 0) {
|
||||
console.error("场景中没有渲染器!");
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < this._renderers.length; i++) {
|
||||
this._renderers[i].render(this);
|
||||
}
|
||||
|
||||
@@ -65,5 +65,5 @@ module es {
|
||||
reset();
|
||||
}
|
||||
|
||||
export var isIPoolable = (props: any): props is IPoolable => typeof (props as IPoolable)['js'] !== 'undefined';
|
||||
export var isIPoolable = (props: any): props is IPoolable => typeof (props as IPoolable)['reset'] !== 'undefined';
|
||||
}
|
||||
Reference in New Issue
Block a user