diff options
Diffstat (limited to 'apps/game_falldown/ball.hpp')
-rw-r--r-- | apps/game_falldown/ball.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/game_falldown/ball.hpp b/apps/game_falldown/ball.hpp new file mode 100644 index 0000000..33fd781 --- /dev/null +++ b/apps/game_falldown/ball.hpp @@ -0,0 +1,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); +}; |