org.argosfields.model
Class Unit

java.lang.Object
  extended byorg.argosfields.model.Unit
Direct Known Subclasses:
AntiAircraftGuns, AntiAircraftTanks, ArmouredTrain, Artillery, BomberWing, Bunkers, FighterSquadron, Gunships, HeavyTanks, Infantry, Interceptors, MediumTanks, Mines, PatrolBoats, RailGuns, Scouts, Submarines, TorpedoBoats, TransportUnit

public abstract class Unit
extends Object

Unit.java

Version:
$Revision: 1.10 $ $Date: 2004/04/17 18:21:01 $
Author:
Xavier Cho

Field Summary
static int MAX_RANK
           
static int MAX_STRENGTH
           
 
Constructor Summary
Unit()
           
 
Method Summary
 boolean canTraverse(Tile tile)
           
 boolean equals(Object obj)
           
static Unit forName(String id)
           
abstract  int getBuildCost()
           
abstract  int getDefensePoint()
           
 Direction getFacing()
           
 String getFireSoundName()
           
 int getIconIndex()
           
protected abstract  int getIconStartIndex()
           
 String getMoveSoundName()
           
 String getName()
           
 Player getPlayer()
           
 int getRank()
           
 int getStrength()
           
protected abstract  int getTerrainFlags()
           
abstract  String getTypeId()
           
abstract  int getWeight()
           
 int hashCode()
           
 void setFacing(Direction facing)
           
 void setPlayer(Player player)
           
 void setRank(int rank)
           
 void setStrength(int strength)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_STRENGTH

public static final int MAX_STRENGTH
See Also:
Constant Field Values

MAX_RANK

public static final int MAX_RANK
See Also:
Constant Field Values
Constructor Detail

Unit

public Unit()
Method Detail

getIconStartIndex

protected abstract int getIconStartIndex()

getTerrainFlags

protected abstract int getTerrainFlags()

getTypeId

public abstract String getTypeId()

getBuildCost

public abstract int getBuildCost()

getDefensePoint

public abstract int getDefensePoint()

getWeight

public abstract int getWeight()

getMoveSoundName

public String getMoveSoundName()
Returns:

getFireSoundName

public String getFireSoundName()
Returns:

getName

public String getName()
Returns:

getIconIndex

public int getIconIndex()
Returns:

getFacing

public Direction getFacing()
Returns:

setFacing

public void setFacing(Direction facing)
Parameters:
facing -

canTraverse

public boolean canTraverse(Tile tile)

getPlayer

public Player getPlayer()
Returns:
Returns the player.

setPlayer

public void setPlayer(Player player)
Parameters:
player - The player to set.

getRank

public int getRank()
Returns:
Returns the rank.

setRank

public void setRank(int rank)
Parameters:
rank - The rank to set.

getStrength

public int getStrength()
Returns:
Returns the strength.

setStrength

public void setStrength(int strength)
Parameters:
strength - The strength to set.

forName

public static Unit forName(String id)
                    throws Exception
Throws:
Exception

equals

public boolean equals(Object obj)
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
See Also:
Object.hashCode()

toString

public String toString()
See Also:
Object.toString()


Copyright © Gnome Korea. All Rights Reserved.