]> git.localhorst.tv Git - sdl-test8.git/blobdiff - src/pong/Ball.h
added collision engine, more or less stole gameplay from sdl-test7
[sdl-test8.git] / src / pong / Ball.h
diff --git a/src/pong/Ball.h b/src/pong/Ball.h
new file mode 100644 (file)
index 0000000..2e54a8c
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Ball.h
+ *
+ *  Created on: Apr 9, 2012
+ *      Author: holy
+ */
+
+#ifndef PONG_BALL_H_
+#define PONG_BALL_H_
+
+#include "../game/Entity.h"
+#include "../shape/Circle.h"
+
+
+namespace pong {
+
+class Ball
+: public game::Entity {
+
+       public:
+               explicit Ball(Scalar radius);
+               virtual ~Ball(void) { };
+
+       public:
+               virtual void Render(SDL_Surface *dest) const;
+
+       private:
+               shape::Circle shape;
+
+};
+
+}
+
+#endif /* PONG_BALL_H_ */