summaryrefslogtreecommitdiff
path: root/src/systems/render.js
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-18 21:07:55 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-18 21:07:55 -0600
commit9b597426ac45775f63b1fe4365c6fa8f3c3179af (patch)
tree0768f5aebcd9ef9f60824f389e1e197f32e4e578 /src/systems/render.js
parent1cffeb5520e416893a93545dc4356365b762a1f7 (diff)
downloadbbiy-9b597426ac45775f63b1fe4365c6fa8f3c3179af.tar.gz
bbiy-9b597426ac45775f63b1fe4365c6fa8f3c3179af.zip
Wow this is some shitty fucking code god damn
Diffstat (limited to 'src/systems/render.js')
-rw-r--r--src/systems/render.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systems/render.js b/src/systems/render.js
index adc8355..8a3e633 100644
--- a/src/systems/render.js
+++ b/src/systems/render.js
@@ -10,7 +10,7 @@ game.system.Render = (graphics) => {
});
sortedEntities.forEach((entity) => {
- if (entity.hasComponent("position") && entity.hasComponent("appearance")) {
+ if (entity.hasComponent("position") && entity.hasComponent("appearance") && entity.hasComponent("alive")) {
const drawSpec = {...entity.components.position, ...entity.components.appearance};
if (entity.hasComponent("sprite")) {
game.sprites[entity.components.sprite.spriteName].draw(elapsedTime, drawSpec);
@@ -21,6 +21,6 @@ game.system.Render = (graphics) => {
});
return new Set();
- }
+ };
return { update };
};