add stupid explosion effect

This commit is contained in:
Asraelite 2016-03-25 17:42:03 +00:00
parent 8a8a9c8ae3
commit 6f85d63839
5 changed files with 128 additions and 8 deletions

View file

@ -10,6 +10,8 @@ class Renderer {
this.canvas = canvas;
this.context = context;
this.effects = new Set();
pallet.fillScreen();
window.addEventListener('resize', pallet.fillScreen);
}
@ -71,10 +73,18 @@ class Renderer {
}
}
this.effects.forEach(effect => {
effect.render();
});
pallet.restore();
}
renderGrid() {
}
addEffect(data) {
this.effects.add(new Effect(data));
}
}