Hugo Hu / Mbed 2 deprecated BRAVEHEART

Dependencies:   mbed N5110 ShiftReg PinDetect

Embed: (wiki syntax)

« Back to documentation index

Enemy Class Reference

Enemy class. More...

#include <Global.h>

Inherits Entity.

Public Types

enum  Type
 

Different type of enemies.

More...

Public Member Functions

int getRight ()
 Returns x-position of the right edge.
int getBottom ()
 Returns y-position of the bottom edge.

Data Fields

Type type
 What type of enemy it is.
int difficulty
 Multiplier used for giving more points.
int jumpRate
 Probability (in percent) of trying to jump if at ground.
int x
 Position of entity (origin: left upper corner)
int vx
 Velocity of entity.
int width
 Width of entity.
int height
 Height of entity.
bool facingLeft
 True if the entity is facing left.
bool dead
 True if enemy is dead.

Detailed Description

Enemy class.

Definition at line 105 of file Global.h.


Member Enumeration Documentation

enum Type

Different type of enemies.

Definition at line 109 of file Global.h.


Member Function Documentation

int getBottom (  ) [inherited]

Returns y-position of the bottom edge.

Definition at line 101 of file Global.h.

int getRight (  ) [inherited]

Returns x-position of the right edge.

Definition at line 98 of file Global.h.


Field Documentation

bool dead [inherited]

True if enemy is dead.

Definition at line 95 of file Global.h.

Multiplier used for giving more points.

Definition at line 118 of file Global.h.

bool facingLeft [inherited]

True if the entity is facing left.

Definition at line 92 of file Global.h.

int height [inherited]

Height of entity.

Definition at line 89 of file Global.h.

int jumpRate

Probability (in percent) of trying to jump if at ground.

Definition at line 121 of file Global.h.

What type of enemy it is.

Definition at line 115 of file Global.h.

int vx [inherited]

Velocity of entity.

Definition at line 83 of file Global.h.

int width [inherited]

Width of entity.

Definition at line 86 of file Global.h.

int x [inherited]

Position of entity (origin: left upper corner)

Definition at line 80 of file Global.h.