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