aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-03 22:55:39 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-03 22:55:39 +0100
commitec5eb920ba1998df048b47c4f136ce980d1d9c38 (patch)
tree2597ccf4e5869688198ec048580aef7baadc986c /src/entity.cpp
parentmove to entity and add player (diff)
downloadthreshold-ec5eb920ba1998df048b47c4f136ce980d1d9c38.tar.gz
threshold-ec5eb920ba1998df048b47c4f136ce980d1d9c38.tar.bz2
threshold-ec5eb920ba1998df048b47c4f136ce980d1d9c38.tar.xz
threshold-ec5eb920ba1998df048b47c4f136ce980d1d9c38.tar.zst
threshold-ec5eb920ba1998df048b47c4f136ce980d1d9c38.zip
I may have an idea
Diffstat (limited to 'src/entity.cpp')
-rw-r--r--src/entity.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/entity.cpp b/src/entity.cpp
index af93f36..124ac02 100644
--- a/src/entity.cpp
+++ b/src/entity.cpp
@@ -1,16 +1,14 @@
-#include "enemy.hpp"
+#include "entity.hpp"
Entity::Entity(void)
{
posX = GetRandomValue(0, SCREENWIDTH);
posY = GetRandomValue(0, SCREENHEIGHT);
- if (static_cast<int>(posX) & 1)
- {
+ if (static_cast<int>(posX) & 1) {
direction = (Vector2){posX / 100, -posY / 100};
} else {
direction = (Vector2){-posX / 100, posY / 100};
}
-
}
Entity::~Entity() {}