public abstract class PlayerUnitImpl extends UnitImpl implements PlayerUnit
UnitImpl.TrainingSlot
Constructor and Description |
---|
PlayerUnitImpl() |
cancelResearch, cancelTrain, cancelTrain, cancelUpgrade, canResearch, canTrain, canUpgrade, compareTo, equals, exists, getAllUnits, getAngle, getBottom, getClosest, getCurrentFrame, getDamageEvaluator, getDistance, getDistance, getDistance, getId, getInitiallySpotted, getInitialPosition, getInitialTilePosition, getKillCount, getLastSpotted, getLeft, getMiddle, getPlayer, getPosition, getRallyPosition, getRallyUnit, getResearchInProgress, getRight, getSize, getTilePosition, getTop, getType, getUnit, getUnitsInRadius, getUpgradeInProgress, getX, getY, hashCode, height, isFlying, isSelected, issueCommand, isVisible, research, setRallyPoint, setRallyPoint, toString, train, upgrade, width
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
exists, getAngle, getBottom, getClosest, getDistance, getDistance, getDistance, getId, getInitiallySpotted, getInitialPosition, getInitialTilePosition, getKillCount, getLastSpotted, getLeft, getMiddle, getPosition, getRight, getSize, getTilePosition, getTop, getType, getUnitsInRadius, getX, getY, height, isFlying, isSelected, isVisible, width
public PlayerUnit getBuildUnit()
getBuildUnit
in interface PlayerUnit
protected Unit getTargetUnit()
public <T extends PlayerUnit> T getWeakestUnitInRadius(int radius, java.util.Collection<T> units)
getWeakestUnitInRadius
in interface PlayerUnit
radius
- pixel radiusunits
- units to check for distancepublic boolean rightClick(Position position, boolean queued)
rightClick
in interface PlayerUnit
position
- the position to right-click toqueued
- true if command is queued, false elsepublic boolean rightClick(Unit target, boolean queued)
rightClick
in interface PlayerUnit
target
- the unit to right-click toqueued
- true if command is queued, false elsepublic boolean isCompleted()
isCompleted
in interface PlayerUnit
public int maxHitPoints()
maxHitPoints
in interface PlayerUnit
public int getHitPoints()
getHitPoints
in interface PlayerUnit
public UnitStatCalculator getUnitStatCalculator()
protected int getMaxEnergy()
public int getArmor()
getArmor
in interface PlayerUnit
public int maxShields()
maxShields
in interface PlayerUnit
public int getShields()
getShields
in interface PlayerUnit
public int getSpellCooldown()
getSpellCooldown
in interface PlayerUnit
public Player getPlayer()
getPlayer
in interface PlayerUnit
getPlayer
in class UnitImpl
public int getInitialHitPoints()
getInitialHitPoints
in interface PlayerUnit
public int getMineralPrice()
getMineralPrice
in interface PlayerUnit
public int getGasPrice()
getGasPrice
in interface PlayerUnit
public int getLastKnownHitPoints()
getLastKnownHitPoints
in interface PlayerUnit
public Position getLastKnownPosition()
getLastKnownPosition
in interface PlayerUnit
public TilePosition getLastKnownTilePosition()
getLastKnownTilePosition
in interface PlayerUnit
public int getSightRange()
getSightRange
in interface PlayerUnit
public boolean isDetector()
isDetector
in interface PlayerUnit
public boolean isDetected()
isDetected
in interface PlayerUnit
public boolean isCloaked()
isCloaked
in interface PlayerUnit
public boolean isFlyer()
isFlyer
in interface PlayerUnit
public boolean isInterruptible()
isInterruptible
in interface PlayerUnit
public int tileWidth()
public int tileHeight()
tileHeight
in interface PlayerUnit
tileHeight
in interface Unit
tileHeight
in class UnitImpl
protected double getTopSpeed()
protected int getMaxGroundHits()
protected int getMaxAirHits()
public double getVelocityX()
getVelocityX
in interface PlayerUnit
public double getVelocityY()
getVelocityY
in interface PlayerUnit
public boolean isIdle()
isIdle
in interface PlayerUnit
public boolean isAccelerating()
isAccelerating
in interface PlayerUnit
public boolean isAttacking()
isAttacking
in interface PlayerUnit
public boolean isAttackFrame()
isAttackFrame
in interface PlayerUnit
public boolean isBeingConstructed()
isBeingConstructed
in interface PlayerUnit
public boolean isBeingHealed()
isBeingHealed
in interface PlayerUnit
public boolean isIrradiated()
isIrradiated
in interface PlayerUnit
public boolean isLockedDown()
isLockedDown
in interface PlayerUnit
public boolean isMaelstrommed()
isMaelstrommed
in interface PlayerUnit
public boolean isStartingAttack()
isStartingAttack
in interface PlayerUnit
public boolean isUnderAttack()
isUnderAttack
in interface PlayerUnit
public boolean isPowered()
isPowered
in interface PlayerUnit
protected int getGroundWeaponMaxRange()
protected int getGroundWeaponMaxCooldown()
protected int getGroundWeaponCooldown(GroundAttacker unit)
protected int getGroundWeaponDamage()
protected int getAirWeaponMaxRange()
protected int getAirWeaponMaxCooldown()
protected int getAirWeaponCooldown(AirAttacker unit)
protected int getAirWeaponDamage()
public int getDamageTo(PlayerUnit to)
getDamageTo
in interface PlayerUnit
public int getDamageFrom(PlayerUnit from)
getDamageFrom
in interface PlayerUnit
public Order getOrder()
getOrder
in interface PlayerUnit
getOrder
in class UnitImpl
public Unit getOrderTarget()
getOrderTarget
in interface PlayerUnit
getOrderTarget
in class UnitImpl
public Position getOrderTargetPosition()
getOrderTargetPosition
in interface PlayerUnit
getOrderTargetPosition
in class UnitImpl
public Order getSecondaryOrder()
getSecondaryOrder
in interface PlayerUnit
getSecondaryOrder
in class UnitImpl
public int getLastCommandFrame()
getLastCommandFrame
in interface PlayerUnit
public UnitCommandType getLastCommand()
getLastCommand
in interface PlayerUnit