]> git.localhorst.tv Git - sdl-test8.git/blob - src/pong/CountingWall.h
added collision engine, more or less stole gameplay from sdl-test7
[sdl-test8.git] / src / pong / CountingWall.h
1 /*
2  * CountingWall.h
3  *
4  *  Created on: Apr 17, 2012
5  *      Author: holy
6  */
7
8 #ifndef PONG_COUNTINGWALL_H_
9 #define PONG_COUNTINGWALL_H_
10
11 #include "../game/Entity.h"
12 #include "../shape/AABB.h"
13
14 #include <SDL/SDL.h>
15
16 namespace pong {
17
18 class CountingWall
19 : public game::Entity {
20
21         public:
22                 CountingWall(Scalar width, Scalar height);
23                 virtual ~CountingWall(void);
24
25         public:
26                 int HitCount(void) { return count; };
27
28         public:
29                 virtual void Collide(Entity &other, const Ray &);
30                 virtual void Render(SDL_Surface *dest) const;
31
32         private:
33                 shape::AABB shape;
34                 int count;
35
36 };
37
38 }
39
40 #endif /* PONG_COUNTINGWALL_H_ */