de.jadv.server.lib
Class ObjectMover

java.lang.Object
  |
  +--de.jadv.server.lib.ObjectMover

public class ObjectMover
extends java.lang.Object

This class holds the functions to move Objects around. This also includes sending of events if needed!

Author:
neitzel

Constructor Summary
ObjectMover()
           
 
Method Summary
static java.awt.Point getXY(java.lang.String locID)
          Get the x and y coordinate of the locationID
static boolean livingMove(Living liv, JAdvObject target)
          move a Living into a location.
static boolean move(JAdvObject obj, JAdvObject target)
          Moves an object into another Object
static boolean move(java.lang.String objID, java.lang.String targetID)
          Moves an object into another Object (With IDs!)
static boolean moveDir(Living liv, byte direction)
          Moves a living into a direction
static boolean moveDir(java.lang.String livID, byte direction)
          Moves a living into a direction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectMover

public ObjectMover()
Method Detail

getXY

public static java.awt.Point getXY(java.lang.String locID)
Get the x and y coordinate of the locationID

Parameters:
locID - - the ID of the location
Returns:
the Point of the location in the level

livingMove

public static boolean livingMove(Living liv,
                                 JAdvObject target)
move a Living into a location.

Parameters:
liv - The living to move
target - The target! This must be a Location!
Returns:
returns true if successfull and false when unsuccessfull

move

public static boolean move(JAdvObject obj,
                           JAdvObject target)
Moves an object into another Object

Parameters:
obj - The object to move
target - The target of the move
Returns:
returns true if successfull and false when unsuccessfull

move

public static boolean move(java.lang.String objID,
                           java.lang.String targetID)
Moves an object into another Object (With IDs!)

Parameters:
objID - The id of the object to move
targetID - the id of the target
Returns:
- returns true if successfull, else false

moveDir

public static boolean moveDir(Living liv,
                              byte direction)
Moves a living into a direction

Parameters:
liv - - living to move
direction - - direction to move into
Returns:
true if successfull and false if move failed!

moveDir

public static boolean moveDir(java.lang.String livID,
                              byte direction)
Moves a living into a direction

Parameters:
livID - - ID of living to move
direction - - direction to move into
Returns:
true if successfull and false if move failed!