From 58ceff79496f60969eecb28a767b1ea28292becb Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Tue, 19 Apr 2022 16:02:53 -0600 Subject: Finish rule system; add burn and sink; particle effects on kill, sink --- src/systems/keyboardInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/systems/keyboardInput.js') diff --git a/src/systems/keyboardInput.js b/src/systems/keyboardInput.js index 06a73c9..1b399ca 100644 --- a/src/systems/keyboardInput.js +++ b/src/systems/keyboardInput.js @@ -12,7 +12,7 @@ game.system.KeyboardInput = () => { const update = (elapsedTime, entities, changedIds) => { for (let id in entities) { const entity = entities[id]; - if (entity.hasComponent('controllable')) { + if (entity.hasComponent('controllable') && entity.hasComponent('alive')) { const controls = entity.components.controllable.controls; if (!changedIds.has(entity.id)) { if (controls.includes('left') && keys[game.controls.left]) { -- cgit v1.2.3-70-g09d2