From 98ba22e7064db57316dfff1ae127feb3dceeb73e Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Thu, 31 Jul 2014 13:58:22 +0200 Subject: Initial commit --- source/logic/Checkpoint.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 source/logic/Checkpoint.cpp (limited to 'source/logic/Checkpoint.cpp') diff --git a/source/logic/Checkpoint.cpp b/source/logic/Checkpoint.cpp new file mode 100644 index 0000000..8a6406c --- /dev/null +++ b/source/logic/Checkpoint.cpp @@ -0,0 +1,30 @@ +#include "Checkpoint.h" + +int Checkpoint::_checkpointCount = 0; + +Checkpoint::Checkpoint(double x, double y) + :GameObject(x,y,BitmapStore::CHECKPOINT) +{ + ++_checkpointCount; +} + +Checkpoint::Checkpoint(const Checkpoint& ref) + :GameObject(ref._x,ref._y,ref._image) +{ + ++_checkpointCount; +} + +Checkpoint::~Checkpoint() +{ + --_checkpointCount; +} + +int Checkpoint::checkpointCount() +{ + return _checkpointCount; +} + +void Checkpoint::collect() +{ + _destroyed = true; +} -- cgit v1.2.3