Commit | Line | Data |
---|---|---|
1 | #include "Ball.h" | |
2 | #include "../debug.h" | |
3 | ||
4 | #include "../Vector2.h" | |
5 | #include "../graphics/graphics.h" | |
6 | ||
7 | ||
8 | /// ***** Constructors/Destructors ***** | |
9 | ||
10 | Ball::Ball(const Vector2& pos, float radius, const float* color) | |
11 | : PhysicsEntity(pos), radius(radius), color(color) | |
12 | { | |
13 | ||
14 | } | |
15 | Ball::~Ball() | |
16 | { | |
17 | ||
18 | } | |
19 | ||
20 | /// ***** Public Class Methods ***** | |
21 | ||
22 | void Ball::draw() const | |
23 | { | |
24 | graphics::drawCircle(radius, position, color); | |
25 | } | |
26 | ||
27 | float Ball::getRadius() const | |
28 | { | |
29 | return radius; | |
30 | } |