SceneManager更改为Core继承egret.DisplayContainer

This commit is contained in:
yhh
2020-07-23 15:39:18 +08:00
parent 347626a8ea
commit 79c5d6990c
25 changed files with 832 additions and 622 deletions

View File

@@ -48,9 +48,6 @@ module es {
this.entityProcessors = new EntityProcessorList();
this.width = SceneManager.stage.stageWidth;
this.height = SceneManager.stage.stageHeight;
this.initialize();
}
@@ -81,13 +78,6 @@ module es {
public onDeactive() {}
public async begin() {
// 如果是场景转换需要在最顶层
if (SceneManager.sceneTransition){
SceneManager.stage.addChildAt(this, SceneManager.stage.numChildren - 1);
}else{
SceneManager.stage.addChild(this);
}
if (this._renderers.length == 0) {
this.addRenderer(new DefaultRenderer());
console.warn("场景开始时没有渲染器 自动添加DefaultRenderer以保证能够正常渲染");