com.croftsoft.apps.mars.model.seri
Class SeriTank
java.lang.Object
com.croftsoft.apps.mars.model.seri.SeriModel
com.croftsoft.apps.mars.model.seri.SeriTank
- All Implemented Interfaces:
- TankConsole, Damageable, Impassable, Model, ModelAccessor, Tank, TankAccessor, SpaceTester, Serializable, Comparable
public final class SeriTank
- extends SeriModel
- implements Tank
The default tank model implementation.
- Since:
- 2003-03-20
- Version:
- 2003-04-29
- See Also:
- Serialized Form
- Author:
- David Wallace Croft
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SeriTank
public SeriTank(World world,
double centerX,
double centerY,
Color color)
initialize
public void initialize(double centerX,
double centerY)
- Specified by:
initialize
in interface Tank
isActive
public boolean isActive()
- Specified by:
isActive
in interface ModelAccessor
getShape
public Shape getShape()
- Specified by:
getShape
in interface TankConsole
- Specified by:
getShape
in interface ModelAccessor
isUpdated
public boolean isUpdated()
- Specified by:
isUpdated
in interface ModelAccessor
getZ
public double getZ()
- Specified by:
getZ
in interface ModelAccessor
setCenter
public void setCenter(double x,
double y)
- Specified by:
setCenter
in interface Model
prepare
public void prepare()
- Specified by:
prepare
in interface Model
update
public void update(double timeDelta)
- Specified by:
update
in interface Model
addDamage
public void addDamage(double newDamage)
- Specified by:
addDamage
in interface Damageable
getAmmo
public int getAmmo()
- Specified by:
getAmmo
in interface TankConsole
- Specified by:
getAmmo
in interface TankAccessor
getBodyHeading
public double getBodyHeading()
- Specified by:
getBodyHeading
in interface TankConsole
- Specified by:
getBodyHeading
in interface TankAccessor
getBodyRotationSpeed
public double getBodyRotationSpeed()
- Specified by:
getBodyRotationSpeed
in interface TankConsole
getColor
public Color getColor()
- Specified by:
getColor
in interface TankAccessor
getDamage
public double getDamage()
- Specified by:
getDamage
in interface TankAccessor
isDryFiring
public boolean isDryFiring()
- Specified by:
isDryFiring
in interface TankAccessor
isFiring
public boolean isFiring()
- Specified by:
isFiring
in interface TankAccessor
getRadius
public double getRadius()
- Specified by:
getRadius
in interface TankAccessor
isSparking
public boolean isSparking()
- Specified by:
isSparking
in interface TankAccessor
getTankOperator
public TankOperator getTankOperator()
- Specified by:
getTankOperator
in interface Tank
getTankSpeed
public double getTankSpeed()
- Specified by:
getTankSpeed
in interface TankConsole
getTurretHeading
public double getTurretHeading()
- Specified by:
getTurretHeading
in interface TankConsole
- Specified by:
getTurretHeading
in interface TankAccessor
setAmmo
public void setAmmo(int ammo)
setTankOperator
public void setTankOperator(TankOperator tankOperator)
- Specified by:
setTankOperator
in interface Tank
getClosestAmmoDumpCenter
public PointXY getClosestAmmoDumpCenter()
- Specified by:
getClosestAmmoDumpCenter
in interface TankConsole
getClosestEnemyTankCenter
public PointXY getClosestEnemyTankCenter()
- Specified by:
getClosestEnemyTankCenter
in interface TankConsole
isSpaceAvailable
public boolean isSpaceAvailable(PointXY center)
- Specified by:
isSpaceAvailable
in interface SpaceTester
go
public void go(PointXY destination)
- Specified by:
go
in interface TankConsole
fire
public void fire()
- Specified by:
fire
in interface TankConsole
rotateTurret
public void rotateTurret(PointXY targetPointXY)
- Specified by:
rotateTurret
in interface TankConsole
CroftSoft Apps Javadoc (2008-09-28 21:15:07)