]> git.localhorst.tv Git - sdl-test7.git/blob - src/pong/Paddle.h
imported current version
[sdl-test7.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 "../geometry/FakeLens.h"
13
14 #include <SDL/SDL.h>
15
16 namespace pong {
17
18 class Paddle
19 : public game::Entity {
20
21         public:
22                 explicit Paddle(const Vector &size);
23
24         public:
25                 virtual void Collide(game::Entity &, const Vector &normal);
26                 virtual void Render(SDL_Surface *dest);
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                 geometry::FakeLens shape;
38                 Vector movementSpeed;
39
40 };
41
42 }
43
44 #endif /* PONG_PADDLE_H_ */