summaryrefslogtreecommitdiff
path: root/source/logic/DestroyedObjectPopup.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/logic/DestroyedObjectPopup.h')
-rw-r--r--source/logic/DestroyedObjectPopup.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/logic/DestroyedObjectPopup.h b/source/logic/DestroyedObjectPopup.h
new file mode 100644
index 0000000..3e694f5
--- /dev/null
+++ b/source/logic/DestroyedObjectPopup.h
@@ -0,0 +1,33 @@
+#ifndef DESTROYEDOBJECTPOPUP_H
+#define DESTROYEDOBJECTPOPUP_H
+
+#include "../logic/LimitedTimeObject.h"
+#include "../presentation/BitmapStore.h"
+
+/**
+* @brief Object that appears on the screen for a short time when another object has been destroyed.
+*
+* Used to give extra visual feedback when a checkpoint has been collected or a Car crashes.
+*
+* @author Justin Wernick
+* @author David Schneider
+*/
+class DestroyedObjectPopup : public LimitedTimeObject
+{
+ public:
+ /**
+ * @brief Creates the popup at the given location, with the given image.
+ *
+ * @param [in] x The x coordinate of the object's position.
+ * @param [in] y The y coordinate of the object's position.
+ * @param [in] image The bitmap to be shown until the popup disappears.
+ */
+ DestroyedObjectPopup(double x, double y, BitmapStore::Image image);
+
+ //assignment and copy constructors have been left with the compiler generated versions
+
+ private:
+ static const int POPUP_TIME = 30; ///< The number of frames that the DestroyedObjectPopup exists before it is destroyed. 1 second at FPS=30.
+};
+
+#endif // DESTROYEDOBJECTPOPUP_H