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/DestroyedObjectPopup.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 source/logic/DestroyedObjectPopup.h (limited to 'source/logic/DestroyedObjectPopup.h') 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 -- cgit v1.2.3