add stupid explosion effect
This commit is contained in:
parent
8a8a9c8ae3
commit
6f85d63839
5 changed files with 128 additions and 8 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue