aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.cpp
blob: 124ac02cb25901c5a9846796d5d8c169c5fcf9c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "entity.hpp"

Entity::Entity(void)
{
    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() {}