diff --git a/src/components/enemy.h b/src/components/enemy.h index 23c8ff1..6ddd546 100644 --- a/src/components/enemy.h +++ b/src/components/enemy.h @@ -3,8 +3,9 @@ namespace TL { - class Enemy : public Component - { - - }; + // I just needed a way to track whether any enemies were still + // in the scene or not, so Locked Doors could open. The easiest + // way was to add an Enemy component, and check if there are any + // in the scene. + class Enemy : public Component { }; } \ No newline at end of file diff --git a/src/components/player.cpp b/src/components/player.cpp index c2b6872..a70546c 100644 --- a/src/components/player.cpp +++ b/src/components/player.cpp @@ -244,6 +244,10 @@ void Player::update() // hack: // destroy orb + // ideally we would have an "attack" component that the orb could + // subscribe to, and delete itself when it hits the player. since + // the orb currently has no way to know if it hit the player, we + // have to add this ugly hack! if (hit->get()) hit->entity()->destroy(); }