Helios Lyons / Mbed 2 deprecated ELEC2645_Project_mc18hal

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Canon Class Reference

Canon Class Reference

Canon.h. More...

#include <Canon.h>

Public Member Functions

int add_inv1_kill (int n)
 Increment Invader 1 Kills.
int add_inv2_kill (int n)
 Increment Invader 2 Kills.
int add_inv3_kill (int n)
 Increment Invader 3 Kills.
int add_boss_kill ()
 Increment Boss Kills.
int get_total_kill ()
 Get total kills.
int get_score ()
 Get the score.
Vector2D get_pos ()
 Get the position.
int get_life ()
 Get remaining lives.
int remove_life ()
 Remove a life.
int reset_life ()
 Reset lives.

Detailed Description

Canon.h.

Defines variables and methods for the Canon.

Author:
Helios A. Lyons
Date:
April, 2020

Definition at line 14 of file Canon.h.


Member Function Documentation

int add_boss_kill (  )

Increment Boss Kills.

Parameters:
increasekills by 1 for Boss mobs

Definition at line 83 of file Canon.cpp.

int add_inv1_kill ( int  n )

Increment Invader 1 Kills.

Parameters:
increasekills by 1 for Invader 1

Definition at line 65 of file Canon.cpp.

int add_inv2_kill ( int  n )

Increment Invader 2 Kills.

Parameters:
increasekills by 1 for Invader 2

Definition at line 71 of file Canon.cpp.

int add_inv3_kill ( int  n )

Increment Invader 3 Kills.

Parameters:
increasekills by 1 for Invader 3

Definition at line 77 of file Canon.cpp.

int get_life (  )

Get remaining lives.

Returns:
current lives remaining

Definition at line 106 of file Canon.cpp.

Vector2D get_pos (  )

Get the position.

Returns:
current Canon position based on direction

Definition at line 101 of file Canon.cpp.

int get_score (  )

Get the score.

Returns:
current score based on current kills

Definition at line 95 of file Canon.cpp.

int get_total_kill (  )

Get total kills.

Returns:
total kills by adding invader subtype kills

Definition at line 89 of file Canon.cpp.

int remove_life (  )

Remove a life.

Parameters:
decreasenumber of lives by 1

Definition at line 111 of file Canon.cpp.

int reset_life (  )

Reset lives.

Parameters:
resetlives to 3

Definition at line 117 of file Canon.cpp.