![]() |
Dragonfly 2.2
A text-based game engine
|
A 2-d (x,y) position. More...
#include <Position.h>
Public Member Functions | |
Position (int init_x, int init_y) | |
Create object at 2-d location (x,y). | |
Position () | |
Default 2-d (x,y) location is (0,0). | |
int | getX () |
Get horizontal coordinate. | |
void | setX (int new_x) |
Set horizontal coordinate. | |
int | getY () |
Get vertical coordinate. | |
void | setY (int new_y) |
Set vertical coordinate. | |
void | setXY (int new_x, int new_y) |
Set horizontal & vertical coordinate. | |
Protected Attributes | |
int | x |
Horizontal coordinate in 2d world. | |
int | y |
Vertical coordinate in 2d world. |
A 2-d (x,y) position.