aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.cpp
blob: 2714eef8d633bcbcceab503a68eb642c76ce1d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*********************************/
/*   THRESHOLD        (  //      */
/*   entity            ( )/      */
/*   by salade         )(/       */
/*  ________________  ( /)       */
/* ()__)____________)))))   :^}  */
/*********************************/

#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};
    }
    radius = 10;
    threshold = false;
}

Entity::~Entity() {}