erland.game.tileadventure
Class GameObject
java.lang.Object
  
erland.game.tileadventure.GameObject
- All Implemented Interfaces: 
 - MapObjectInterface, Cloneable
 
- Direct Known Subclasses: 
 - AnimatedObject, BitmapObject
 
public abstract class GameObject
- extends Object
- implements Cloneable, MapObjectInterface
  
 
 
 
 
GameObject
public GameObject()
init
public void init(GameEnvironmentInterface environment)
- Specified by:
 init in interface MapObjectInterface
 
 
getEnvironment
protected GameEnvironmentInterface getEnvironment()
- Get the game environment which the block exists in
 
- Returns:
 - The game environment the block exists in
 
 
 
getContainer
public IrregularBlockContainerInterface getContainer()
- Get the container which the block exists in
- Specified by:
 getContainer in interface MapObjectInterface
 
- Returns:
 - The block container
 
 
 
setContainer
public void setContainer(IrregularBlockContainerInterface cont)
- Specified by:
 setContainer in interface MapObjectInterface
 
 
setObjectMap
public void setObjectMap(MapObjectContainerInterface objectMap)
 
 
getObjectMap
public MapObjectContainerInterface getObjectMap()
 
 
setActionMap
public void setActionMap(GameObjectMapActionInterface actionMap)
 
 
getActionMap
public GameObjectMapActionInterface getActionMap()
 
 
getPosX
public float getPosX()
- Specified by:
 getPosX in interface MapObjectInterface
 
 
getPosY
public float getPosY()
- Specified by:
 getPosY in interface MapObjectInterface
 
 
getPosZ
public float getPosZ()
- Specified by:
 getPosZ in interface MapObjectInterface
 
 
getMovingPosX
public float getMovingPosX()
 
 
getMovingPosY
public float getMovingPosY()
 
 
getMovingPosZ
public float getMovingPosZ()
 
 
getPixelPosX
public int getPixelPosX()
 
 
getPixelPosY
public int getPixelPosY()
 
 
getDrawingPosX
public int getDrawingPosX(float dx,
                          float dy,
                          float dz)
 
 
getDrawingPosY
public int getDrawingPosY(float dx,
                          float dy,
                          float dz)
 
 
setPos
public void setPos(float x,
                   float y,
                   float z)
- Specified by:
 setPos in interface MapObjectInterface
 
 
getRedraw
public boolean getRedraw()
- Check if the block needs to be redrawn
 
- Returns:
 - true/false (Needs redraw/Does not need redraw)
 
 
 
clone
public Object clone()
- Clone the block
- Specified by:
 clone in interface MapObjectInterface- Overrides:
 clone in class Object
 
- Returns:
 - A clone of the block
 
 
 
write
public void write(ParameterValueStorageExInterface out)
 
 
read
public void read(ParameterValueStorageExInterface in)
 
 
actionChild
protected boolean actionChild(Action action)
 
 
action
public boolean action(Action action)
 
 
isActionPossible
protected Action isActionPossible(Action action)
 
 
isMovableChild
protected boolean isMovableChild(Direction direction)
 
 
isMovable
public boolean isMovable(Direction direction)
 
 
isPushableChild
protected boolean isPushableChild(Direction direction)
 
 
isPushable
public boolean isPushable(Direction direction)
 
 
setParent
public void setParent(GameObject parent)
 
 
setChilds
public void setChilds(GameObject[] childs)
 
 
getChilds
public GameObject[] getChilds()
 
 
getParent
public GameObject getParent()
 
 
setMoveVector
public void setMoveVector(Vector3D vector)
 
 
getMoveVector
public Vector3D getMoveVector()
 
 
update
public boolean update()
 
 
getBoundingBox
public Box3D getBoundingBox()
- Specified by:
 getBoundingBox in interface MapObjectInterface
 
 
fillBoundingBox
public void fillBoundingBox(float x,
                            float y,
                            float z,
                            Box3D boundingBox)
 
 
Copyright © 2003-2006 Erland Isaksson. All Rights Reserved.