#include <Object.h>
Object is a base class for all game objects.
Object::Object |
( |
double |
x = 0.0 , |
|
|
double |
y = 0.0 , |
|
|
double |
width = 1.0 , |
|
|
double |
height = 1.0 |
|
) |
| |
The default constructor of Object.
- Parameters
-
x | X position of Object. Defaults to 0.0 |
y | Y position of Object. Defaults to 0.0 |
width | width of Object. Defaults to 1.0 |
height | height of Object. Defaults to 1.0 |
Object implementation The default constructor of Object.
- Parameters
-
x | X position of Object. Defaults to 0.0 |
y | Y position of Object. Defaults to 0.0 |
width | width of Object. Defaults to 1.0 |
height | height of Object. Defaults to 1.0 |
Destroy object by seeting it's destroyed value to true. If object is destroyed, it shouldn't be used.
- Returns
- void
bool Object::getDestroyed |
( |
| ) |
const |
Check if object is destroyed.
- Returns
- bool
double Object::getHeight |
( |
| ) |
const |
Get objects height.
- Returns
- double
double Object::getPrevX |
( |
| ) |
const |
Get previous X position.
- Returns
- double
double Object::getPrevY |
( |
| ) |
const |
Get previous Y position.
- Returns
- double
double Object::getWidth |
( |
| ) |
const |
Get objects width.
- Returns
- double
double Object::getX |
( |
| ) |
const |
Get X position.
- Returns
- double
double Object::getY |
( |
| ) |
const |
Get Y position.
- Returns
- double
void Object::savePrevious |
( |
| ) |
|
|
virtual |
Virtual function that changes members that hold information about previous step to hold current state of Object.
- Returns
- void
Reimplemented in Creature.
Previous X position of Object.
Previous Y position of Object.
The documentation for this class was generated from the following files:
- C:/Users/Michał/Desktop/forest_mldp/Projekt/trunk/Object.h
- C:/Users/Michał/Desktop/forest_mldp/Projekt/trunk/Object.cpp