Represents bird obstacles in the game.
More...
#include <BirdObsticals.h>
|
static constexpr unsigned short | HEIGHT_SIZE_TYPE_MAX = static_cast<unsigned short>(FlyHeight::HIG) + 1 |
| Maximum number of height types.
|
|
static constexpr unsigned short | SZ_SIZE_TYPE_MAX = static_cast<unsigned short>(BirdType::LARGE) + 1 |
| Maximum number of size types.
|
|
|
virtual void | set_moving_speed (const int speed) |
| Sets moving speed.
|
|
void | pass_me_already () |
| Emitted when obstacle passes out of view.
|
|
void | speedChanged (int newSpeed) |
| Emitted when speed changes.
|
|
std::shared_ptr< QMutex > | mutex |
| Mutex for thread safety.
|
|
int | moving_speed { Settings::Scene::Difficulty::DEF_SPEED } |
| Current movement speed.
|
|
Represents bird obstacles in the game.
◆ BirdType
Possible sizes for birds.
Enumerator |
---|
SMALL | Small bird size.
|
MEDIUM | Medium bird size.
|
LARGE | Large bird size.
|
◆ FlyHeight
Possible flying heights for birds.
Enumerator |
---|
LOW | Low flying height.
|
MED | Medium flying height.
|
HIG | High flying height.
|
◆ BirdObsticals()
BirdObsticals::BirdObsticals |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ autoheightUpdateSzRandomly()
bool BirdObsticals::autoheightUpdateSzRandomly |
( |
| ) |
const |
|
inline |
Checks if height auto-update is enabled.
- Returns
- True if auto-update is enabled
◆ autoUpdateSzRandomly()
bool BirdObsticals::autoUpdateSzRandomly |
( |
| ) |
const |
|
inline |
Checks if size auto-update is enabled.
- Returns
- True if auto-update is enabled
◆ getHeight()
Gets current flying height.
- Returns
- Current FlyHeight
◆ getSize()
BirdType BirdObsticals::getSize |
( |
| ) |
const |
|
inline |
Gets current bird size.
- Returns
- Current BirdType
◆ provide_current_bounding_rect()
QRect & BirdObsticals::provide_current_bounding_rect |
( |
| ) |
|
|
overridevirtual |
Provides current collision bounding rect.
- Returns
- Reference to current QRect
Implements Obsticals.
◆ provide_drawing_srcframe()
QPixmap & BirdObsticals::provide_drawing_srcframe |
( |
| ) |
|
|
overridevirtual |
Provides current drawing frame.
- Returns
- Reference to current QPixmap
Implements Obsticals.
◆ setAutoUpdateHeightRandomly()
void BirdObsticals::setAutoUpdateHeightRandomly |
( |
bool |
st | ) |
|
|
inline |
Enables/disables automatic height updates.
- Parameters
-
st | True to enable auto-update |
◆ setAutoUpdateSzRandomly()
void BirdObsticals::setAutoUpdateSzRandomly |
( |
bool |
st | ) |
|
|
inline |
Enables/disables automatic size updates.
- Parameters
-
st | True to enable auto-update |
◆ setHeight()
Sets flying height.
- Parameters
-
◆ setSize()
void BirdObsticals::setSize |
( |
BirdType |
t | ) |
|
Sets bird size.
- Parameters
-
The documentation for this class was generated from the following files:
- extern_app/games/CCIMX_DinoGame/figure/obstacle/BirdObsticals.h
- extern_app/games/CCIMX_DinoGame/figure/obstacle/BirdObsticals.cpp