]> git.localhorst.tv Git - sdl-test8.git/blob - src/pong/Paddle.h
added Makefile
[sdl-test8.git] / src / pong / Paddle.h
1 /*
2  * Paddle.h
3  *
4  *  Created on: Apr 10, 2012
5  *      Author: holy
6  */
7
8 #ifndef PONG_PADDLE_H_
9 #define PONG_PADDLE_H_
10
11 #include "../game/Entity.h"
12 #include "../shape/AABB.h"
13
14
15 namespace pong {
16
17 class Paddle
18 : public game::Entity {
19
20         public:
21                 Paddle(Scalar width, Scalar height);
22                 virtual ~Paddle(void) { };
23
24         public:
25                 virtual void Collide(Entity &other, const Ray &);
26                 virtual void Render(SDL_Surface *dest) const;
27
28         public:
29                 void SetMovementSpeed(Vector);
30
31                 void StartMovingUp(void);
32                 void StopMovingUp(void);
33                 void StartMovingDown(void);
34                 void StopMovingDown(void);
35
36         private:
37                 shape::AABB shape;
38                 Vector movementSpeed;
39
40 };
41
42 }
43
44 #endif /* PONG_PADDLE_H_ */