Dmitrijs Griskovs / Mbed 2 deprecated el17dg

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Boss Class Reference

Boss Class Reference

Boss Class. More...

#include <boss.h>

Inherits GameObject.

Public Member Functions

 Boss ()
 Constructor Sets values for the boss' sprite body circle area, the blast circle area and the circle radius for collsion callculations.
void updateAndDrawBossBlasts ()
 Updates and draws the boss blasts accross the screen.
bool updateAndDrawBoss ()
 Updates and draws the boss.
void updateCutscene ()
 Updates and draws the boss' cutscene of entering the game.
void draw ()
 draws boss' sprite.
void resetCutscene ()
 resets the boss' cutscene.
bool isFinishedCutscene ()
 It starts the boss fight sequence when the cutscene is finished.
void spawn (Point spawn_pos)
 Activates the object at the given postion.

Data Fields

int boss_lives
 contains boss' lives.

Detailed Description

Boss Class.

A class to describe the states of the boss ship.

Author:
Dmitrijs Griskovs
Date:
30/04/2019

Definition at line 12 of file boss.h.


Constructor & Destructor Documentation

Boss (  )

Constructor Sets values for the boss' sprite body circle area, the blast circle area and the circle radius for collsion callculations.

Also, resets the cutscene.

Definition at line 31 of file boss.h.


Member Function Documentation

void draw (  )

draws boss' sprite.

Definition at line 113 of file boss.h.

bool isFinishedCutscene (  )

It starts the boss fight sequence when the cutscene is finished.

Returns:
bool true

Definition at line 120 of file boss.h.

void resetCutscene (  )

resets the boss' cutscene.

Definition at line 115 of file boss.h.

void spawn ( Point  spawn_pos ) [inherited]

Activates the object at the given postion.

Parameters:
spawn_possets position of x and y into pos (Point).

Definition at line 19 of file gameobject.h.

bool updateAndDrawBoss (  )

Updates and draws the boss.

this function is monitored in game.cpp and when the boss becomes inactive, the gameplay would switch from boss to normal.

Returns:
bool active, when the boss is out of lives

Definition at line 66 of file boss.h.

void updateAndDrawBossBlasts (  )

Updates and draws the boss blasts accross the screen.

Definition at line 48 of file boss.h.

void updateCutscene (  )

Updates and draws the boss' cutscene of entering the game.

It freezes the screen until the boss is set on the screen. Also, it sets its position and number of lives.

Returns:
bool active, when the boss is out of lives

Definition at line 92 of file boss.h.


Field Documentation

contains boss' lives.

Definition at line 125 of file boss.h.