aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-06 21:11:01 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-06 21:11:01 +0100
commita3e3264a73cd82de83799b77bfd64c60d6debbd0 (patch)
tree71131aadf38e1a0486576fa800056355001b0c04 /src/entity.cpp
parentmore dynamic and faster enemy movement (diff)
downloadthreshold-a3e3264a73cd82de83799b77bfd64c60d6debbd0.tar.gz
threshold-a3e3264a73cd82de83799b77bfd64c60d6debbd0.tar.bz2
threshold-a3e3264a73cd82de83799b77bfd64c60d6debbd0.tar.xz
threshold-a3e3264a73cd82de83799b77bfd64c60d6debbd0.tar.zst
threshold-a3e3264a73cd82de83799b77bfd64c60d6debbd0.zip
amazing textures. v0.0.4
Diffstat (limited to 'src/entity.cpp')
-rw-r--r--src/entity.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/entity.cpp b/src/entity.cpp
index 3b21557..eda350f 100644
--- a/src/entity.cpp
+++ b/src/entity.cpp
@@ -8,7 +8,10 @@
#include "entity.hpp"
-Entity::Entity(void) : hp(1)
+Entity::Entity()
+: Entity(1) {}
+
+Entity::Entity(int const & h) : hp(h)
{
auto dir = GetRandomValue(0, 3);
@@ -40,8 +43,7 @@ Entity::Entity(void) : hp(1)
}
}
- direction = (Vector2){0.02f, 0.02f};
- radius = 10; // default radius. this is changed later
+ direction = (Vector2){0.02f, 0.0f};
threshold = false;
}