修复physics register失效问题
This commit is contained in:
@@ -11,7 +11,7 @@ abstract class Collider extends Component{
|
||||
public _isRotationDirty = true;
|
||||
protected _isParentEntityAddedToScene;
|
||||
protected _colliderRequiresAutoSizing;
|
||||
protected _localOffset: Vector2;
|
||||
protected _localOffset: Vector2 = new Vector2(0, 0);
|
||||
protected _isColliderRegisterd;
|
||||
|
||||
public get bounds(): Rectangle {
|
||||
|
||||
@@ -74,7 +74,9 @@ class Scene extends egret.DisplayObjectContainer {
|
||||
/** 初始化场景 */
|
||||
public initialize(){
|
||||
/** 初始化默认相机 */
|
||||
this.camera = this.createEntity("camera").addComponent(new Camera());
|
||||
this.camera = this.createEntity("camera").getOrCreateComponent(new Camera());
|
||||
|
||||
Physics.reset();
|
||||
|
||||
if (this.entityProcessors)
|
||||
this.entityProcessors.begin();
|
||||
|
||||
Reference in New Issue
Block a user