#include <spawnunit.h>
Inheritance diagram for SpawnUnit:

Public Member Functions | |
| SpawnUnit (GameMap *gamemap, const MapCoordinate3D &position, int vehicleTypeID, int owner) | |
| SpawnUnit (GameMap *gamemap, const ContainerBase *carrier, int vehicleTypeID) | |
| ASCString | getDescription () const |
| Vehicle * | getUnit () |
Protected Member Functions | |
| virtual GameActionID | getID () const |
| virtual ActionResult | runAction (const Context &context) |
| virtual ActionResult | undoAction (const Context &context) |
| virtual ActionResult | verify () |
| virtual void | readData (tnstream &stream) |
| virtual void | writeData (tnstream &stream) const |
Friends | |
| template<class Child> | |
| GameAction * | GameActionCreator (GameMap *map) |
Definition at line 30 of file spawnunit.h.
| SpawnUnit::SpawnUnit | ( | GameMap * | gamemap, | |
| const MapCoordinate3D & | position, | |||
| int | vehicleTypeID, | |||
| int | owner | |||
| ) |
Definition at line 31 of file spawnunit.cpp.
| SpawnUnit::SpawnUnit | ( | GameMap * | gamemap, | |
| const ContainerBase * | carrier, | |||
| int | vehicleTypeID | |||
| ) |
| ASCString SpawnUnit::getDescription | ( | ) | const [virtual] |
Implements GameAction.
Definition at line 57 of file spawnunit.cpp.
References GameAction::getMap(), VehicleType::getName(), GameMap::getvehicletype_byid(), and MapCoordinate::toString().
| Vehicle * SpawnUnit::getUnit | ( | ) |
Definition at line 154 of file spawnunit.cpp.
References GameAction::getMap(), and GameMap::getUnit().
Referenced by ConstructUnitCommand::go(), and undoAction().
| GameActionID SpawnUnit::getID | ( | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 106 of file spawnunit.cpp.
References ActionRegistry::SpawnUnit.
| ActionResult SpawnUnit::runAction | ( | const Context & | context | ) | [protected, virtual] |
Implements GameAction.
Definition at line 111 of file spawnunit.cpp.
References ViewRegistration::AddView, evaluateviewcalculation(), GameAction::execute(), MapCoordinate3D::getBitmappedHeight(), GameMap::getContainer(), GameMap::getField(), GameAction::getMap(), GameMap::getvehicletype_byid(), Vehicle::height, GameMap::idManager, Vehicle::networkid, UnitFieldRegistration::RegisterInCarrier, UnitFieldRegistration::RegisterOnField, Vehicle::setMovement(), ActionResult::successful(), ASCString::toString(), ActionRegistry::UnitFieldRegistration, GameMap::IDManager::unitnetworkid, ContainerBaseType::view, ActionRegistry::ViewRegistration, MapCoordinate::x, Vehicle::xpos, MapCoordinate::y, and Vehicle::ypos.
| ActionResult SpawnUnit::undoAction | ( | const Context & | context | ) | [protected, virtual] |
Implements GameAction.
Definition at line 160 of file spawnunit.cpp.
References GameMap::getField(), GameAction::getMap(), getUnit(), GameMap::getvehicletype_byid(), ContainerBaseType::id, GameMap::idManager, ASCString::toString(), Vehicle::typ, and GameMap::IDManager::unitnetworkid.
| ActionResult SpawnUnit::verify | ( | ) | [protected, virtual] |
| void SpawnUnit::readData | ( | tnstream & | stream | ) | [protected, virtual] |
Implements GameAction.
Definition at line 72 of file spawnunit.cpp.
References MapCoordinate3D::read(), and tnstream::readInt().
| void SpawnUnit::writeData | ( | tnstream & | stream | ) | const [protected, virtual] |
Implements GameAction.
Definition at line 92 of file spawnunit.cpp.
References MapCoordinate3D::write(), and tnstream::writeInt().
| GameAction* GameActionCreator | ( | GameMap * | map | ) | [friend] |
1.5.1