#include <Unit.h>
◆ Unit()
◆ afflictDamage()
| void Unit::afflictDamage |
( |
int |
dmg_ | ) |
|
◆ attack()
| void Unit::attack |
( |
Tile & |
tile | ) |
|
◆ build() [1/2]
| bool Unit::build |
( |
int |
idx | ) |
|
◆ build() [2/2]
| bool Unit::build |
( |
int |
idx, |
|
|
bool |
ignoreCost |
|
) |
| |
◆ centerTile()
| Tile * Unit::centerTile |
( |
| ) |
const |
◆ clearStateForTile()
| void Unit::clearStateForTile |
( |
Tile * |
t | ) |
|
◆ clearTiles()
| void Unit::clearTiles |
( |
| ) |
|
◆ closestRecallBuilding()
| Unit * Unit::closestRecallBuilding |
( |
| ) |
const |
◆ despawn()
◆ distance() [1/2]
| int Unit::distance |
( |
Tile & |
tile | ) |
const |
◆ distance() [2/2]
| int Unit::distance |
( |
Unit & |
unit | ) |
const |
◆ distanceVector()
◆ enqueueState()
| void Unit::enqueueState |
( |
const std::shared_ptr< BaseState > & |
state | ) |
|
◆ getBuildEntity()
| Unit & Unit::getBuildEntity |
( |
| ) |
const |
◆ getBuiltBy()
| Unit & Unit::getBuiltBy |
( |
| ) |
const |
◆ getCombatTarget()
| Unit * Unit::getCombatTarget |
( |
| ) |
const |
◆ getDamage()
| int Unit::getDamage |
( |
Unit & |
target | ) |
const |
◆ getNextTile()
| Tile * Unit::getNextTile |
( |
| ) |
|
◆ getPlayer()
◆ getSpawnTile()
| Tile & Unit::getSpawnTile |
( |
| ) |
const |
◆ getTile()
| Tile * Unit::getTile |
( |
int |
tileID | ) |
const |
◆ getVisionTileIDs()
| std::set< int > Unit::getVisionTileIDs |
( |
| ) |
const |
◆ harvest()
| void Unit::harvest |
( |
Tile & |
tile | ) |
|
◆ isDead()
◆ move()
| void Unit::move |
( |
Tile & |
targetTile | ) |
|
◆ moveRelative()
| void Unit::moveRelative |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
◆ operator==()
| bool Unit::operator== |
( |
int |
id | ) |
const |
◆ position_in_bounds()
| bool Unit::position_in_bounds |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
◆ rightClick()
| void Unit::rightClick |
( |
Tile & |
tile | ) |
|
◆ rightClickRelative()
| void Unit::rightClickRelative |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
◆ setDirection() [1/2]
| void Unit::setDirection |
( |
int |
newX, |
|
|
int |
newY |
|
) |
| |
◆ setDirection() [2/2]
| void Unit::setDirection |
( |
Position & |
dir | ) |
|
◆ setPosition()
| void Unit::setPosition |
( |
Tile & |
tile | ) |
|
◆ setStateForTile()
| void Unit::setStateForTile |
( |
Tile * |
t | ) |
|
◆ spawn()
| void Unit::spawn |
( |
Tile & |
x, |
|
|
int |
initValue |
|
) |
| |
◆ transitionState() [1/2]
| void Unit::transitionState |
( |
| ) |
|
◆ transitionState() [2/2]
| void Unit::transitionState |
( |
std::shared_ptr< BaseState > |
nextState | ) |
|
◆ tryAttack()
◆ tryHarvest()
| void Unit::tryHarvest |
( |
| ) |
|
◆ tryMove()
| void Unit::tryMove |
( |
int16_t |
x, |
|
|
int16_t |
y |
|
) |
| |
◆ update()
◆ animationCounter
| int Unit::animationCounter = 0 |
◆ armor
◆ buildEntityID
| int Unit::buildEntityID = -1 |
◆ buildInventory
◆ buildTimer
◆ builtByID
◆ canAttack
◆ canHarvest
◆ canMove
◆ carryCapacity
| float Unit::carryCapacity = 10 |
◆ combatInterval
| double Unit::combatInterval = 1 |
◆ combatTargetID
| int Unit::combatTargetID = -1 |
◆ combatTimer
| double Unit::combatTimer = 0 |
◆ config
◆ damageMax
◆ damageMin
◆ damagePiercing
| int Unit::damagePiercing = -1 |
◆ damageRange
| int Unit::damageRange = -1 |
◆ direction
◆ foodConsumption
| int Unit::foodConsumption |
◆ foodProduction
◆ game
◆ goldCarry
| float Unit::goldCarry = 0 |
◆ goldCost
◆ groundUnit
◆ harvestInterval
| double Unit::harvestInterval = .5 |
◆ harvestIterator
| int Unit::harvestIterator {} |
◆ harvestTargetID
| int Unit::harvestTargetID = -1 |
◆ harvestTimer
| int Unit::harvestTimer = 0 |
◆ health
◆ health_max
◆ height
◆ id
◆ lumberCarry
| float Unit::lumberCarry = 0 |
◆ lumberCost
◆ military
◆ name
◆ nameID
Unit Name ID (i.e Peasant1)
◆ player_
◆ recallable
| bool Unit::recallable = false |
◆ removedFromGame
| bool Unit::removedFromGame = false |
◆ sight
◆ spawnDuration
◆ spawnTileID
| int Unit::spawnTileID = -1 |
◆ spawnTimer
◆ speed
◆ state
| std::shared_ptr<BaseState> Unit::state = nullptr |
◆ stateList
◆ stateManager
◆ stepsLeft
◆ stoneCarry
| float Unit::stoneCarry = 0 |
◆ stoneCost
◆ structure
◆ tile
| Tile* Unit::tile = nullptr |
◆ typeId
◆ walking_interval
| double Unit::walking_interval = 1 |
◆ walking_path
| std::vector<Tile *> Unit::walking_path |
◆ walking_timer
| int Unit::walking_timer = 0 |
◆ walkingGoalID
| int Unit::walkingGoalID = -1 |
◆ waterUnit
◆ width
◆ worldPosition
The documentation for this class was generated from the following files:
- /home/per/git/code/deep-rts/include/DeepRTS/unit/Unit.h
- /home/per/git/code/deep-rts/src/Unit.cpp