Main game widget that manages the dinosaur game.
More...
#include <DinasourGameMainWidget.h>
|
void | gain_score (ObstacleType type) |
| Increases score based on obstacle type.
|
|
void | pause () |
| Pauses the game.
|
|
void | resume () |
| Resumes the game.
|
|
void | process_die () |
| Processes death event.
|
|
void | clearAndReset () |
| Resets game to initial state.
|
|
void | animate_lay () |
| Triggers lay animation.
|
|
void | animate_up () |
| Triggers jump animation.
|
|
|
void | game_started () |
| Emitted when game starts.
|
|
void | game_overed () |
| Emitted when game ends.
|
|
Main game widget that manages the dinosaur game.
◆ DinasourGameMainWidget()
DinasourGameMainWidget::DinasourGameMainWidget |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Constructs the main game widget.
- Parameters
-
◆ gain_score
void DinasourGameMainWidget::gain_score |
( |
ObstacleType |
type | ) |
|
|
slot |
Increases score based on obstacle type.
- Parameters
-
type | Type of obstacle passed |
◆ get_dinasour_instance()
Dinasour * DinasourGameMainWidget::get_dinasour_instance |
( |
| ) |
const |
|
inline |
Gets dinosaur instance.
- Returns
- Pointer to dinosaur object
◆ infoPack()
Gets current game information.
- Returns
- CurrentInfoPack containing score and difficulty
◆ is_game_over()
bool DinasourGameMainWidget::is_game_over |
( |
| ) |
|
|
inline |
Checks if game is over.
- Returns
- True if game is over
◆ is_game_started()
bool DinasourGameMainWidget::is_game_started |
( |
| ) |
|
|
inline |
Checks if game has started.
- Returns
- True if game is started
◆ keyPressEvent()
void DinasourGameMainWidget::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
keypress issue
- Parameters
-
◆ keyReleaseEvent()
void DinasourGameMainWidget::keyReleaseEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
key release issue
- Parameters
-
◆ mousePressEvent()
void DinasourGameMainWidget::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
mouse press issue
- Parameters
-
◆ paintEvent()
void DinasourGameMainWidget::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotected |
The documentation for this class was generated from the following files:
- extern_app/games/CCIMX_DinoGame/ui/DinasourGameMainWidget.h
- extern_app/games/CCIMX_DinoGame/ui/DinasourGameMainWidget.cpp