-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBall.h
More file actions
40 lines (26 loc) · 703 Bytes
/
Copy pathBall.h
File metadata and controls
40 lines (26 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#define MaxXSpeed 0.5
class Ball
{
private:
static constexpr float _X_SPEED = 1;
static constexpr float _Y_SPEED = 0.06;
Gamebuino_Meta::Color color;
void _moveFree(float dt);
void _testRebound();
void _testReachBottom();
void _followPaddle();
public:
static constexpr uint8_t ballSizeMini = 1;
static constexpr uint8_t ballSizeMaxi = 2;
float x, y;
uint8_t radius;
uint8_t sizeX, sizeY;
float moveX, moveY;
bool bestroyed;
bool free;
bool metal;
void init();
void move(float dt);
void draw();
};