ELEC2645 (2018/19) / Mbed 2 deprecated el17dg

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Embed: (wiki syntax)

« Back to documentation index

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.

Static Public Attributes

static const int max_boss_blasts = 5
 Maximum boss blasts on the screen.

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 30 of file boss.h.


Member Function Documentation

void draw (  )

draws boss' sprite.

Definition at line 110 of file boss.h.

bool isFinishedCutscene (  )

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

Returns:
bool true

Definition at line 117 of file boss.h.

void resetCutscene (  )

resets the boss' cutscene.

Definition at line 112 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 65 of file boss.h.

void updateAndDrawBossBlasts (  )

Updates and draws the boss blasts accross the screen.

Definition at line 47 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 91 of file boss.h.


Field Documentation

contains boss' lives.

Definition at line 122 of file boss.h.

const int max_boss_blasts = 5 [static]

Maximum boss blasts on the screen.

Definition at line 17 of file boss.h.