Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Position Class Reference

Position Class Reference

Position class. More...

#include <Position.h>

Inherited by CheckAlienCollision [virtual], CheckCollision [virtual], Explosion, Map [private], and RandomMovement [virtual].

Public Member Functions

Vector2D get_pos ()
 Gets the xy position of the sprite.

Protected Attributes

int position_x_
 X position on lcd.
int position_y_
 Y position on lcd.
bool direction_
 Movement direction.

Detailed Description

Position class.

Position parent class

Author:
Benjamin Evans, University of Leeds
Date:
May 2020

Definition at line 13 of file Position.h.


Member Function Documentation

Vector2D get_pos (  )

Gets the xy position of the sprite.

Returns:
position_x_
position_x_

Definition at line 3 of file Position.cpp.


Field Documentation

bool direction_ [protected]

Movement direction.

Note:
true = East, false = West

Definition at line 35 of file Position.h.

int position_x_ [protected]

X position on lcd.

Definition at line 27 of file Position.h.

int position_y_ [protected]

Y position on lcd.

Definition at line 30 of file Position.h.