infinitewisdom.model
Interface ServerUnitIF
- All Superinterfaces:
- java.io.Serializable, UnitIF
- All Known Implementing Classes:
- Archer, ServerUnitIFAdapter, Swordsman
public interface ServerUnitIF
- extends UnitIF
Provides control interface for Units. This class can be used for cheating in local game,
so use UnitIF instead when possible, to avoid accidentally fooling yourself. On a networked
game you can only mess up your local cache of the gameworld.
Methods inherited from interface infinitewisdom.model.UnitIF |
getAttackPoints, getAttackRange, getCoolDown, getGameWorld, getHitPoints, getId, getPlayer, getPosition, getShield, getSize, getSpeed, getState, toString |
commandMove
void commandMove(Vec2f p)
commandAttack
void commandAttack(ServerUnitIF enemy)
commandStop
void commandStop()
getGoal
Vec2f getGoal()
getEnemy
UnitIF getEnemy()
setGameWorld
void setGameWorld(GameWorld gw)
collide
boolean collide(Vec2f tmppos)
setPlayer
void setPlayer(PlayerIF p)
setPosition
void setPosition(Vec2f p)
setHitPoints
void setHitPoints(double d)
setAttackPoints
void setAttackPoints(double d)
setAttackRange
void setAttackRange(double d)
setSpeed
void setSpeed(double d)
setShield
void setShield(double d)
setState
void setState(UnitStateE s)
setCoolDown
void setCoolDown(int cd)
doesDamage
boolean doesDamage()
step
void step()
- Timestep of simulation.