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

Handles all rendering operations for the game scene. More...

#include <SceneDrawer.h>

Public Member Functions

 Q_DISABLE_COPY_MOVE (SceneDrawer)
 disable copy move object
 
 SceneDrawer (const QRect &sceneRect)
 Constructs a SceneDrawer with specified boundaries.
 
void bind_painter (QPainter *p)
 Binds a QPainter for drawing operations.
 
void drawSky ()
 Draws the sky background.
 
void drawContent (int score, Difficulty type)
 Draws game content (score and difficulty)
 
void drawDinasore (Dinasour *dinasour)
 Draws the dinosaur character.
 
void drawObstical (const QList< Obsticals * > &obs)
 Draws all obstacles.
 
void drawMainGround ()
 Draws the main ground line.
 
void drawFlowyGround (int current_speed)
 Draws the flowing ground effect.
 
void setDrawHello (bool st)
 Sets whether to draw the hello message.
 

Detailed Description

Handles all rendering operations for the game scene.

Constructor & Destructor Documentation

◆ SceneDrawer()

SceneDrawer::SceneDrawer ( const QRect &  sceneRect)
explicit

Constructs a SceneDrawer with specified boundaries.

Parameters
sceneRectThe bounding rectangle of the scene

Member Function Documentation

◆ bind_painter()

void SceneDrawer::bind_painter ( QPainter *  p)

Binds a QPainter for drawing operations.

Parameters
pPointer to the QPainter to use

◆ drawContent()

void SceneDrawer::drawContent ( int  score,
Difficulty  type 
)

Draws game content (score and difficulty)

Parameters
scoreCurrent game score
typeCurrent difficulty level

◆ drawDinasore()

void SceneDrawer::drawDinasore ( Dinasour dinasour)

Draws the dinosaur character.

Parameters
dinasourPointer to the dinosaur object

◆ drawFlowyGround()

void SceneDrawer::drawFlowyGround ( int  current_speed)

Draws the flowing ground effect.

Parameters
current_speedCurrent game speed

◆ drawObstical()

void SceneDrawer::drawObstical ( const QList< Obsticals * > &  obs)

Draws all obstacles.

Parameters
obsList of obstacles to draw

◆ setDrawHello()

void SceneDrawer::setDrawHello ( bool  st)
inline

Sets whether to draw the hello message.

Parameters
stTrue to draw hello message, false otherwise

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