Dmitrijs Griskovs / Mbed 2 deprecated el17dg

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

GameOverManager Class Reference

GameOverManager Class Reference

GameOverManager Class. More...

#include <gameovermanager.h>

Public Member Functions

 GameOverManager ()
 Constructor.
void reset ()
 Resets the gameOver to the animiation to appear again.
void updateAndDraw ()
 Updates and draws the game over animation.
bool isPlayingAnimation ()
 Checks for whether the animation of GameOver has stoped drawing or not.

Detailed Description

GameOverManager Class.

A class for updating and drawing GameOver state.

Author:
Dmitrijs Griskovs
Date:
30/04/2019

Definition at line 10 of file gameovermanager.h.


Constructor & Destructor Documentation

Constructor.

It init the GameOver with reseting the statrting sequence of the gameOver state.

Definition at line 17 of file gameovermanager.h.


Member Function Documentation

bool isPlayingAnimation (  )

Checks for whether the animation of GameOver has stoped drawing or not.

It check the value of the counter against the total length of the animation play. When the counter equals to the total length, it indicates that the animation has stopped

Definition at line 55 of file gameovermanager.h.

void reset (  )

Resets the gameOver to the animiation to appear again.

Returns:
bool started, when GameOver begins.

Definition at line 23 of file gameovermanager.h.

void updateAndDraw (  )

Updates and draws the game over animation.

It draws "GameOver" sprite from the leftside of the screen to the center and "youDied" sprite from the right side to the center.

Definition at line 29 of file gameovermanager.h.