org.globalse.arena.sword.algorithm
Class Tile

java.lang.Object
  |
  +--org.globalse.arena.frag.objects.FRAGObject
        |
        +--org.globalse.arena.sword.algorithm.Tile

public class Tile
extends FRAGObject

This class crates a part of the map with its vegetation. It is also responsible for the collosion check within the map.

See Also:
Serialized Form

Fields inherited from class org.globalse.arena.frag.objects.FRAGObject
controller, gameName, influenceRange, objectName, owner, position, visibilityRange
 
Constructor Summary
Tile()
           
 
Method Summary
 void actionEvent(ObjectActionEvent event)
           
 MathVector checkCollision(java.lang.String other, MathVector oldPos, MathVector delta)
           
 void createSourroundedMaps(int xpos, int ypos)
           
 void draw(DrawManager drawManager)
           
 double[][] getMap()
           
static double getScaleFactor()
           
 void init(java.lang.String gameName, int x, int y, int detailLevel_)
          Constructor method.
 int xPos()
           
 int yPos()
           
 
Methods inherited from class org.globalse.arena.frag.objects.FRAGObject
checkAndResetMark, checkMark, clone, controlAcquired, controlLost, getGameManager, getInfluenceRange, getObjectManager, getObjectName, getPosition, killed, mark, newerVersion, setInfluenceRange, setPosition
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tile

public Tile()
Method Detail

init

public void init(java.lang.String gameName,
                 int x,
                 int y,
                 int detailLevel_)
          throws java.lang.Exception
Constructor method. It computes the map. Sets its objectName attribute.
Parameters:
gameName - the FRAG-gamename
x - the x-coordinates of the point at the lower left corner of the tile
y - the y-coordinates of the point at the lower left corner of the tile
detailLevel - the level of the detail of the landscape. This is the log of the resolution of the Tile.

draw

public void draw(DrawManager drawManager)
Overrides:
draw in class FRAGObject

actionEvent

public void actionEvent(ObjectActionEvent event)
Overrides:
actionEvent in class FRAGObject

checkCollision

public MathVector checkCollision(java.lang.String other,
                                 MathVector oldPos,
                                 MathVector delta)
Overrides:
checkCollision in class FRAGObject

createSourroundedMaps

public void createSourroundedMaps(int xpos,
                                  int ypos)
                           throws java.lang.Exception

getScaleFactor

public static double getScaleFactor()

getMap

public double[][] getMap()

xPos

public int xPos()

yPos

public int yPos()



This page is hosted by the Chair for Applied Software Engineering of the Technische Universität München.
Imprint (Impressum)