|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.golden.gamedev.object.Sprite
com.golden.gamedev.object.AnimatedSprite
gameobjects.AbstractGameObject
public abstract class AbstractGameObject
This class is the basic class of all game objects. It contains all the methods and variables that all game objects have in common
Constructor Summary | |
---|---|
AbstractGameObject(java.lang.String name,
java.lang.String bshName,
double x,
double y,
com.golden.gamedev.engine.BaseLoader bsLoader,
com.golden.gamedev.engine.BaseInput bsInput,
com.golden.gamedev.engine.BaseAudio bsSound)
Creates a new game object with the specified name at the specified coordinates |
Method Summary | |
---|---|
int |
compareTo(AbstractGameObject o)
|
AnimationPool |
getAnimPool()
Returns the pool of this game object's animation sequences |
AnimationScheduler |
getAnimScheduler()
Returns the animation scheduler |
java.lang.String |
getBshName()
Returns the beanshell name of this game object. |
com.golden.gamedev.engine.BaseLoader |
getBsLoader()
Returns the base loader object |
java.lang.String |
getDescription()
Deprecated. The system has no use for the method anymore |
GameLocation |
getGameLocation()
Returns the game location of the game object |
Hotspot |
getHotspot()
Returns the hotspot of the item |
double |
getMidX()
Returns the middle x coordinate of the character |
double |
getMidY()
Returns the middle y coordinate of the character |
java.lang.String |
getName()
Returns the name of the game object |
boolean |
isPicked()
Returns whethter this item has been picked by the player |
void |
render(java.awt.Graphics2D g)
|
void |
setDescription(java.lang.String desc)
Deprecated. The system has no use for the method anymore |
void |
setGameLocation(GameLocation loc)
Set the game location of the game object |
void |
setName(java.lang.String name)
Sets the name of the character |
void |
setToPicked()
Sets the item to picked status |
void |
update(long elapsedTime)
|
Methods inherited from class com.golden.gamedev.object.AnimatedSprite |
---|
getAnimationTimer, getFinishAnimationFrame, getFrame, getImage, getImage, getImages, getStartAnimationFrame, isAnimate, isLoopAnim, render, setAnimate, setAnimationFrame, setAnimationTimer, setFrame, setImage, setImages, setLoopAnim |
Methods inherited from class com.golden.gamedev.object.Sprite |
---|
addHorizontalSpeed, addVerticalSpeed, forceX, forceY, getBackground, getDataID, getDistance, getHeight, getHorizontalSpeed, getID, getLayer, getOldX, getOldY, getScreenX, getScreenY, getVerticalSpeed, getWidth, getX, getY, isActive, isImmutable, isOnScreen, isOnScreen, move, moveTo, moveX, moveY, setActive, setBackground, setDataID, setHorizontalSpeed, setID, setImmutable, setLayer, setLocation, setMovement, setSpeed, setVerticalSpeed, setX, setY |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractGameObject(java.lang.String name, java.lang.String bshName, double x, double y, com.golden.gamedev.engine.BaseLoader bsLoader, com.golden.gamedev.engine.BaseInput bsInput, com.golden.gamedev.engine.BaseAudio bsSound)
name
- name of the game objectbshName
- name that will be used for this object in beanshell
scriptsx
- x-coordinatey
- y-coordinatebsLoader
- bsInput
- bsSound
- Method Detail |
---|
public int compareTo(AbstractGameObject o)
compareTo
in interface java.lang.Comparable<AbstractGameObject>
public double getMidX()
public double getMidY()
public com.golden.gamedev.engine.BaseLoader getBsLoader()
public AnimationPool getAnimPool()
public void setToPicked()
public boolean isPicked()
public void setGameLocation(GameLocation loc)
loc
- game location of the game objectpublic GameLocation getGameLocation()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- new name of the characterpublic java.lang.String getBshName()
public void setDescription(java.lang.String desc)
desc
- description for the itempublic java.lang.String getDescription()
public Hotspot getHotspot()
public AnimationScheduler getAnimScheduler()
public void update(long elapsedTime)
update
in class com.golden.gamedev.object.AnimatedSprite
public void render(java.awt.Graphics2D g)
render
in class com.golden.gamedev.object.Sprite
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |