summaryrefslogtreecommitdiff
path: root/source/logic/Checkpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/logic/Checkpoint.cpp')
-rw-r--r--source/logic/Checkpoint.cpp30
1 files changed, 30 insertions, 0 deletions
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;
+}