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.


Method Summary
 boolean collide(Vec2f tmppos)
           
 void commandAttack(ServerUnitIF enemy)
           
 void commandMove(Vec2f p)
           
 void commandStop()
           
 boolean doesDamage()
           
 UnitIF getEnemy()
           
 Vec2f getGoal()
           
 void setAttackPoints(double d)
           
 void setAttackRange(double d)
           
 void setCoolDown(int cd)
           
 void setGameWorld(GameWorld gw)
           
 void setHitPoints(double d)
           
 void setPlayer(PlayerIF p)
           
 void setPosition(Vec2f p)
           
 void setShield(double d)
           
 void setSpeed(double d)
           
 void setState(UnitStateE s)
           
 void step()
          Timestep of simulation.
 
Methods inherited from interface infinitewisdom.model.UnitIF
getAttackPoints, getAttackRange, getCoolDown, getGameWorld, getHitPoints, getId, getPlayer, getPosition, getShield, getSize, getSpeed, getState, toString
 

Method Detail

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.