Terrain performance
This commit is contained in:
1 parent
9b9bbc70e8
commit
953a02e3f5
5 files changed
+46
-29
No files matched your search
+8
-2
@@ -25,9 +25,12 @@ export const EXPLOSION_TYPES = {
|
||||
update(explosion) {
|
||||
return ++explosion.cr < explosion.r;
|
||||
},
|
||||
draw(explosion, foreground, terrain) {
|
||||
draw(explosion, foreground) {
|
||||
const {x, y, cr} = explosion;
|
||||
drawExplosion(foreground, x, y, cr);
|
||||
},
|
||||
clip(explosion, terrain) {
|
||||
const {x, y, cr} = explosion;
|
||||
clipTerrain(terrain, (ctx) => drawExplosion(ctx, x, y, cr));
|
||||
},
|
||||
damage(explosion, player) {
|
||||
@@ -44,9 +47,12 @@ export const EXPLOSION_TYPES = {
|
||||
update(explosion) {
|
||||
return ++explosion.cr < explosion.r;
|
||||
},
|
||||
draw(explosion, foreground, terrain) {
|
||||
draw(explosion, foreground) {
|
||||
const {x, y, cr} = explosion;
|
||||
drawExplosion(foreground, x, y, cr);
|
||||
},
|
||||
clip(explosion, terrain) {
|
||||
const {x, y, cr} = explosion;
|
||||
drawExplosion(terrain, x, y, cr);
|
||||
},
|
||||
damage(explosion, player) {}
|
||||
|
||||
Reference in new issue
Block a user