Base class for all obstacle objects in the game. More...
#include <Obsticals.h>
Public Slots | |
| virtual void | set_moving_speed (const int speed) |
| Sets moving speed. | |
Signals | |
| void | pass_me_already () |
| Emitted when obstacle passes out of view. | |
| void | speedChanged (int newSpeed) |
| Emitted when speed changes. | |
Public Member Functions | |
| Obsticals (QObject *parent=nullptr) | |
| Constructs an Obsticals object. | |
| virtual | ~Obsticals ()=default |
| Default virtual destructor. | |
| virtual bool | is_intersect (Dinasour *dinasour) |
| Checks collision with dinosaur. | |
| int | get_moving_speed () const |
| Gets current moving speed. | |
| virtual void | update_position () |
| Updates obstacle position. | |
| virtual QRect & | provide_current_bounding_rect ()=0 |
| Provides collision bounding rectangle (pure virtual) | |
| virtual QPixmap & | provide_drawing_srcframe ()=0 |
| Provides drawing frame (pure virtual) | |
Public Member Functions inherited from FigureObject | |
| FigureObject (QObject *parent=nullptr) | |
| Constructs a FigureObject. | |
| virtual | ~FigureObject ()=default |
| Virtual destructor. | |
Protected Attributes | |
| std::shared_ptr< QMutex > | mutex |
| Mutex for thread safety. | |
Properties | |
| int | moving_speed { Settings::Scene::Difficulty::DEF_SPEED } |
| Current movement speed. | |
Base class for all obstacle objects in the game.
|
explicit |
Constructs an Obsticals object.
| parent | Parent QObject |
|
inline |
Gets current moving speed.
|
virtual |
Checks collision with dinosaur.
| dinasour | Pointer to dinosaur object |
|
pure virtual |
Provides collision bounding rectangle (pure virtual)
Implements FigureObject.
Implemented in BirdObsticals, and CactusObsticals.
|
pure virtual |
Provides drawing frame (pure virtual)
Implements FigureObject.
Implemented in BirdObsticals, and CactusObsticals.
|
virtualslot |
Sets moving speed.
| speed | New speed value |
|
signal |
Emitted when speed changes.
| newSpeed | New speed value |