summaryrefslogtreecommitdiff
path: root/source/logic/DestroyedObjectPopup.h
blob: 3e694f5afecdcac10cdf3149e41c92f05a7b7b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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