X-Git-Url: https://git.r.bdr.sh/rbdr/sumo/blobdiff_plain/7ade6f8d96825386bf2e89dea51f9297cbac8e9c..aaa1f8f65bae59680e930fa6788e4662abae332c:/lib/systems/render.js diff --git a/lib/systems/render.js b/lib/systems/render.js index 06d0e60..a0b4659 100644 --- a/lib/systems/render.js +++ b/lib/systems/render.js @@ -55,11 +55,11 @@ export default class RenderSystem extends System { added(engine) { this.renderables = engine.getNodes(RenderableNode); - this.renderables.on('nodeAdded', (event) => { + this.renderables.addEventListener('nodeAdded', (event) => { this.application.stage.addChild(event.node.container.container); }); - this.renderables.on('nodeRemoved', (event) => { + this.renderables.addEventListener('nodeRemoved', (event) => { this.application.stage.removeChild(event.node.container.container); }); @@ -88,5 +88,8 @@ export default class RenderSystem extends System { * frame * @memberof RenderSystem */ - update(currentFrameDuration) {} -}; + update(currentFrameDuration) { + + this.application.render(); + } +}