Unit Class Reference

#include <Unit.h>

List of all members.


Public Member Functions

 Unit ()
 Public constructor.
virtual ~Unit ()
 Virtual destructor.
common::ErrorCodeType PlaceOnMap (Map *pMap, int x, int y)
 Places unit on map.
common::ErrorCodeType RemoveFromMap ()
 Removes unit from map.
common::ErrorCodeType MoveTo (int x, int y)
 Moves to new location.

Private Attributes

int m_IdCode
 Unit ID code.
Mapm_pMap
 Pointer to map.
int m_TileX
 X position on map.
int m_TileY
 Y position on map.

Detailed Description

(*** add brief description here ***)
Full Description
(*** add full description here ***)

Constructor & Destructor Documentation

Unit (  ) 

Public constructor.

Full Description
This method creates a new instance of the class.
Returns:
New instance of the class.

~Unit (  )  [virtual]

Virtual destructor.

Full Description
This method destroys an existing instance of the class.
Returns:
None.


Member Function Documentation

common::ErrorCodeType PlaceOnMap ( Map pMap,
int  x,
int  y 
)

Places unit on map.

Full Description
This method places the unit on a map.
Returns:
Success of successful.

Failure otherwise.

Parameters:
pMap  Pointer to map.
x  X coordinate on map.
y  Y coordinate on map.

common::ErrorCodeType RemoveFromMap (  ) 

Removes unit from map.

Full Description
This method removes the unit from a map.
Returns:
Success of successful.

Failure otherwise.

common::ErrorCodeType MoveTo ( int  x,
int  y 
)

Moves to new location.

Full Description
This method moves the unit to a new location.
Returns:
Success of successful.

Failure otherwise.

Parameters:
x  X coordinate of move.
y  Y coordinate of move.


Member Data Documentation

int m_IdCode [private]

Unit ID code.

Map* m_pMap [private]

Pointer to map.

int m_TileX [private]

X position on map.

int m_TileY [private]

Y position on map.


The documentation for this class was generated from the following files: