summaryrefslogtreecommitdiffhomepage
path: root/Enemy.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-18 20:38:16 +0200
committerAki <please@ignore.pl>2022-04-18 20:39:44 +0200
commitadd251b4ea37b57cf926b07e5e04d9b065f82a2c (patch)
tree9cecb47f168c985017971a3373de59b35f85db1a /Enemy.cpp
parentbbec07ab3de333649d14a64fa01f7e8ad6d56c58 (diff)
downloadbullethell2022-add251b4ea37b57cf926b07e5e04d9b065f82a2c.zip
bullethell2022-add251b4ea37b57cf926b07e5e04d9b065f82a2c.tar.gz
bullethell2022-add251b4ea37b57cf926b07e5e04d9b065f82a2c.tar.bz2
Playing around with enemies, added dumb pos manipulation
Diffstat (limited to 'Enemy.cpp')
-rw-r--r--Enemy.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Enemy.cpp b/Enemy.cpp
index 7caea31..b8329a2 100644
--- a/Enemy.cpp
+++ b/Enemy.cpp
@@ -9,7 +9,7 @@
Enemy::Enemy(std::unique_ptr<Generator> generator) :
- m_hold {2},
+ m_hold {0},
m_position {std::make_shared<Vector2>()},
m_generator {std::move(generator)}
{
@@ -38,3 +38,11 @@ Enemy::draw()
return;
DrawCircle(m_position->x, m_position->y, 6, DARKGRAY);
}
+
+
+void
+Enemy::set_position(const float x, const float y)
+{
+ m_position->x = x;
+ m_position->y = y;
+}