erland.game.tileadventure
Class AnimatedObject

java.lang.Object
  extended by erland.game.tileadventure.GameObject
      extended by erland.game.tileadventure.AnimatedObject
All Implemented Interfaces:
GameObjectUpdateInterface, MapObjectInterface, Cloneable
Direct Known Subclasses:
MovableObject

public class AnimatedObject
extends GameObject
implements GameObjectUpdateInterface


Constructor Summary
AnimatedObject()
           
 
Method Summary
 Object clone()
          Clone the block
 void draw(Graphics g)
           
 void read(ParameterValueStorageExInterface in)
           
 void setAnimation(Image image, AnimationInterface animation)
          Set the animation
 void setAnimation(String image, AnimationInterface animation)
          Set the animation
 boolean update()
           
 void write(ParameterValueStorageExInterface out)
           
 
Methods inherited from class erland.game.tileadventure.GameObject
action, actionChild, fillBoundingBox, getActionMap, getBoundingBox, getChilds, getContainer, getDrawingPosX, getDrawingPosY, getEnvironment, getMoveVector, getMovingPosX, getMovingPosY, getMovingPosZ, getObjectMap, getParent, getPixelPosX, getPixelPosY, getPosX, getPosY, getPosZ, getRedraw, init, isActionPossible, isMovable, isMovableChild, isPushable, isPushableChild, setActionMap, setChilds, setContainer, setMoveVector, setObjectMap, setParent, setPos
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimatedObject

public AnimatedObject()
Method Detail

setAnimation

public void setAnimation(Image image,
                         AnimationInterface animation)
Set the animation

Parameters:
image - The main image
animation - The animation object containing the subimages to animate between

setAnimation

public void setAnimation(String image,
                         AnimationInterface animation)
Set the animation

Parameters:
image - The name of the main image
animation - The animation object containing the subimages to animate between

update

public boolean update()
Specified by:
update in interface GameObjectUpdateInterface
Overrides:
update in class GameObject

draw

public void draw(Graphics g)
Specified by:
draw in interface MapObjectInterface

write

public void write(ParameterValueStorageExInterface out)
Overrides:
write in class GameObject

read

public void read(ParameterValueStorageExInterface in)
Overrides:
read in class GameObject

clone

public Object clone()
Description copied from class: GameObject
Clone the block

Specified by:
clone in interface MapObjectInterface
Overrides:
clone in class GameObject
Returns:
A clone of the block


Copyright © 2003-2006 Erland Isaksson. All Rights Reserved.