diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-06 21:11:01 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-06 21:11:01 +0100 |
commit | a3e3264a73cd82de83799b77bfd64c60d6debbd0 (patch) | |
tree | 71131aadf38e1a0486576fa800056355001b0c04 /src/entity.cpp | |
parent | more dynamic and faster enemy movement (diff) | |
download | threshold-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.cpp | 8 |
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; } |