GEJM
1.0.0.0
a 2D platformer made by students
|
#include <Coin.h>
Public Member Functions | |
Coin (double x=0.0, double y=0.0) | |
~Coin () | |
Public Member Functions inherited from SolidObject | |
SolidObject (double x=0.0, double y=0.0, double width=1.0, double height=1.0) | |
virtual | ~SolidObject () |
Public Member Functions inherited from Object | |
Object (double x=0.0, double y=0.0, double width=1.0, double height=1.0) | |
virtual | ~Object () |
virtual void | savePrevious () |
void | destroy () |
double | getY () const |
double | getX () const |
double | getWidth () const |
double | getHeight () const |
double | getPrevX () const |
double | getPrevY () const |
bool | getDestroyed () const |
Additional Inherited Members | |
Protected Attributes inherited from Object | |
double | x |
double | y |
double | width |
double | height |
double | prevX |
double | prevY |
bool | destroyed |
Coin is a collectable coin object that derives from SolidObject. It's width and height is fixed to 1.0 x 1.0.
Coin::Coin | ( | double | x = 0.0 , |
double | y = 0.0 |
||
) |
Coin constructor that sets position and size of a Coin. Size is a constant 1.0 width and 1.0 height.
x | X position of coin. Defaults to 0.0. |
y | Y position of coin. Defaults to 0.0. |
Coin implementation Coin constructor that sets position and size of a Coin. Size is a constant 1.0 width and 1.0 height.
x | X position of coin. Defaults to 0.0. |
y | Y position of coin. Defaults to 0.0. |
Coin::~Coin | ( | ) |
Coin destructor.