CCIMXDesktop
 
Loading...
Searching...
No Matches
ObstacleListManager Class Reference

Manages the creation, rendering, and collision detection of obstacles. More...

#include <ObstacleListManager.h>

Inheritance diagram for ObstacleListManager:

Public Slots

void flush_activate_obsticals_once ()
 Updates active obstacles.
 
void set_obstacle_speed (int speed)
 Sets obstacle movement speed.
 

Signals

void pass_a_obstacle (ObstacleType type, Obsticals *which)
 Emitted when an obstacle is passed.
 

Public Member Functions

 ObstacleListManager (QObject *parent=nullptr)
 Constructs an ObstacleListManager.
 
QList< Obsticals * > get_should_render ()
 Gets obstacles that should be rendered.
 
void start_blank_working ()
 Initializes the obstacle system.
 
void animate_once ()
 Performs one animation frame update.
 
void reset_back ()
 Resets all obstacles to initial state.
 
bool is_intersects (Dinasour *dinasour)
 Checks for collision with dinosaur.
 
QList< Obsticals * > get_pools ()
 Gets all obstacle pools.
 
void set_max_obstacle_cnt (short max_count)
 Sets maximum number of active obstacles.
 
int max_obstacle_cnt () const
 Gets maximum obstacle count.
 
int activate_obstacle_cnt () const
 Gets count of active obstacles.
 
int get_obstacle_speed ()
 Gets current obstacle movement speed.
 

Detailed Description

Manages the creation, rendering, and collision detection of obstacles.

Constructor & Destructor Documentation

◆ ObstacleListManager()

ObstacleListManager::ObstacleListManager ( QObject *  parent = nullptr)
explicit

Constructs an ObstacleListManager.

Parameters
parentParent QObject

Member Function Documentation

◆ activate_obstacle_cnt()

int ObstacleListManager::activate_obstacle_cnt ( ) const
inline

Gets count of active obstacles.

Returns
Number of currently active obstacles

◆ get_obstacle_speed()

int ObstacleListManager::get_obstacle_speed ( )

Gets current obstacle movement speed.

Returns
Current speed value

◆ get_pools()

QList< Obsticals * > ObstacleListManager::get_pools ( )

Gets all obstacle pools.

Returns
List of all obstacle instances

◆ get_should_render()

QList< Obsticals * > ObstacleListManager::get_should_render ( )

Gets obstacles that should be rendered.

Returns
List of active obstacles

◆ is_intersects()

bool ObstacleListManager::is_intersects ( Dinasour dinasour)

Checks for collision with dinosaur.

Parameters
dinasourPointer to dinosaur object
Returns
True if collision detected

◆ max_obstacle_cnt()

int ObstacleListManager::max_obstacle_cnt ( ) const
inline

Gets maximum obstacle count.

Returns
Current maximum obstacle count

◆ pass_a_obstacle

void ObstacleListManager::pass_a_obstacle ( ObstacleType  type,
Obsticals which 
)
signal

Emitted when an obstacle is passed.

Parameters
typeType of obstacle passed
whichSpecific obstacle instance

◆ set_max_obstacle_cnt()

void ObstacleListManager::set_max_obstacle_cnt ( short  max_count)

Sets maximum number of active obstacles.

Parameters
max_countMaximum obstacle count

◆ set_obstacle_speed

void ObstacleListManager::set_obstacle_speed ( int  speed)
slot

Sets obstacle movement speed.

Parameters
speedNew speed value

The documentation for this class was generated from the following files: