summaryrefslogtreecommitdiffstats
path: root/apps/game_falldown/ball.hpp
blob: 33fd7814afced476adb91954af75a6a33407c978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
#include "../../hal/api.hpp"
#include "../../globals.hpp"

class Ball {
    private:
        float m_position[2];
        int m_speed;
        int m_radius = 5;

    public:
        bool m_pressed_left = false;
        bool m_pressed_right = false;

        bool m_has_died = false;

        Ball(int x, int y, int speed = 1);
        void update();
        void draw(Api *app_api);
};