summaryrefslogtreecommitdiff
path: root/src/systems/keyboardInput.js
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-19 16:02:53 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-19 16:02:53 -0600
commit58ceff79496f60969eecb28a767b1ea28292becb (patch)
tree3a6acad4d9333aef2e18bb5d073e054926b20340 /src/systems/keyboardInput.js
parent9b597426ac45775f63b1fe4365c6fa8f3c3179af (diff)
downloadbbiy-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.js2
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]) {