From dd2698bb26fc194176f96ba4fc27741db1d54623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Str=C3=B6mb=C3=A4ck?= <filip.stromback@liu.se> Date: Mon, 21 Nov 2022 10:10:34 +0100 Subject: [PATCH] Added example in the component system. --- components/enemy.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/enemy.cpp b/components/enemy.cpp index b3a404d..1ef3b6f 100644 --- a/components/enemy.cpp +++ b/components/enemy.cpp @@ -20,6 +20,10 @@ static shared_ptr<Entity> create_bullet(Entity &from) { // Remove them when they are outside of the screen. e->add(std::make_shared<Remove_Outside>(20.0f)); + // Add a shield, just to show that it is possible. + // e->add(std::make_shared<Shield>(Tag::enemy)); + // e->add(std::make_shared<Shield>(Tag::player)); + return e; } -- GitLab