Clip dirt cone to screen

This commit is contained in:
zenoamaro committed 2019-07-03 01:30:51 +02:00
1 parent 492393c186
commit 29adbf5190
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ export const DEATH_SPECS = [
{type: 'dirtCone', r: 50}, {type: 'dirtCone', r: 50},
{type: 'dirtCone', r: 100}, {type: 'dirtCone', r: 100},
{type: 'dirtCone', r: 200}, {type: 'dirtCone', r: 200},
{type: 'dirtCone', r: 400}, {type: 'dirtCone', r: H},
]; ];
export const PLAYER_STARTING_TOOLS = [ export const PLAYER_STARTING_TOOLS = [
+1 -1
View File
@@ -124,7 +124,7 @@ export const EXPLOSION_TYPES = {
osc.stop(); osc.stop();
}, },
update(explosion) { update(explosion) {
return ++explosion.cr < explosion.r; return ++explosion.cr < Math.min(explosion.r, explosion.y);
}, },
draw(explosion, foreground, terrain) { draw(explosion, foreground, terrain) {
const {x, y, cr, osc, pattern} = explosion; const {x, y, cr, osc, pattern} = explosion;