diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-19 16:02:53 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-19 16:02:53 -0600 |
commit | 58ceff79496f60969eecb28a767b1ea28292becb (patch) | |
tree | 3a6acad4d9333aef2e18bb5d073e054926b20340 /src/systems/keyboardInput.js | |
parent | 9b597426ac45775f63b1fe4365c6fa8f3c3179af (diff) | |
download | bbiy-58ceff79496f60969eecb28a767b1ea28292becb.tar.gz bbiy-58ceff79496f60969eecb28a767b1ea28292becb.zip |
Finish rule system; add burn and sink; particle effects on kill, sink
Diffstat (limited to 'src/systems/keyboardInput.js')
-rw-r--r-- | src/systems/keyboardInput.js | 2 |
1 files changed, 1 insertions, 1 deletions
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]) { |