新增事件发送接收器

This commit is contained in:
yhh
2020-06-15 12:16:23 +08:00
parent 16892eb7af
commit c3120d791f
15 changed files with 141 additions and 123 deletions

View File

@@ -0,0 +1,3 @@
enum CoreEmitterType {
Update,
}

View File

@@ -1,29 +0,0 @@
class VerletDemo extends RenderableComponent {
private _world: VerletWorld;
private _stage: egret.Stage;
protected getWidth(){
return this.entity.scene.stage.stageWidth;
}
protected getHeight(){
return this.entity.scene.stage.stageHeight;
}
public onAddedToEntity(){
this._stage = this.entity.scene.stage;
this._world = new VerletWorld(new Rectangle(0, 0, this.width, this.height));
this._world.addComposite(new Box(new Vector2(100, 100), 50, 20));
this._world.addComposite(new Box(new Vector2(10, 10), 200, 100));
}
public update(){
this._world.update();
this._world.debugRender(this._stage);
}
initialize() {
}
}