aboutsummaryrefslogtreecommitdiff
path: root/src/Collectible.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Collectible.cpp')
-rw-r--r--src/Collectible.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Collectible.cpp b/src/Collectible.cpp
new file mode 100644
index 0000000..3bf298c
--- /dev/null
+++ b/src/Collectible.cpp
@@ -0,0 +1,25 @@
+#include "Collectible.h"
+
+#include <QSettings>
+
+Collectible::Collectible(QGraphicsItem *parent, QGraphicsScene *scene)
+ : Sprite(parent, scene)
+{
+
+}
+
+void Collectible::collected()
+{
+ setData(0, "colllected");
+ removeMe();
+}
+
+void Collectible::setValue(int value)
+{
+ m_value = value;
+}
+
+int Collectible::getValue() const
+{
+ return m_value;
+}