mirror of
https://github.com/NoelFB/tiny_link.git
synced 2024-11-28 19:08:55 +08:00
few additional notes
This commit is contained in:
parent
7173d65263
commit
14c1d625a1
|
@ -3,8 +3,9 @@
|
||||||
|
|
||||||
namespace TL
|
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 { };
|
||||||
}
|
}
|
|
@ -244,6 +244,10 @@ void Player::update()
|
||||||
|
|
||||||
// hack:
|
// hack:
|
||||||
// destroy orb
|
// 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<Orb>())
|
if (hit->get<Orb>())
|
||||||
hit->entity()->destroy();
|
hit->entity()->destroy();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user