blob: 9f3b35fe4c0a7817c42c7df171aacb59f30cc0a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include "entity.hpp"
Entity::Entity(void) : hp(1)
{
posX = GetRandomValue(0, SCREENWIDTH);
posY = GetRandomValue(0, SCREENHEIGHT);
if (static_cast<int>(posX) & 1) {
direction = (Vector2){posX / 100, -posY / 100};
} else {
direction = (Vector2){-posX / 100, posY / 100};
}
}
Entity::~Entity() {}
|