]> git.localhorst.tv Git - sdl-test8.git/blob - src/pong/CountingWall.cpp
added collision engine, more or less stole gameplay from sdl-test7
[sdl-test8.git] / src / pong / CountingWall.cpp
1 /*
2  * CountingWall.cpp
3  *
4  *  Created on: Apr 17, 2012
5  *      Author: holy
6  */
7
8 #include "CountingWall.h"
9
10 #include <limits>
11
12 using game::Entity;
13
14
15 namespace pong {
16
17 CountingWall::CountingWall(Scalar width, Scalar height)
18 : Entity(&shape, std::numeric_limits<Scalar>::infinity())
19 , shape(width, height)
20 , count(0) {
21
22 }
23
24 CountingWall::~CountingWall(void) {
25
26 }
27
28
29 void CountingWall::Collide(Entity &, const Ray &) {
30         ++count;
31 }
32
33 void CountingWall::Render(SDL_Surface *dest) const {
34
35 }
36
37 }