com.golden.gamedev
Class GameObject
java.lang.Object
|
+--com.golden.gamedev.GameObject
- public abstract class GameObject
- extends Object
Similar like Game
class except that this class is created under
GameEngine
frame work.
Method Summary |
boolean |
checkPosMouse(int x1,
int y1,
int x2,
int y2)
|
boolean |
click()
|
protected void |
finalize()
|
void |
finish()
|
int |
getCurrentFPS()
|
int |
getHeight()
|
BufferedImage |
getImage(String imagefile)
|
BufferedImage |
getImage(String imagefile,
boolean useMask)
|
BufferedImage[] |
getImages(String imagefile,
int col,
int row)
|
BufferedImage[] |
getImages(String imagefile,
int col,
int row,
boolean useMask)
|
BufferedImage[] |
getImages(String imagefile,
int col,
int row,
boolean useMask,
int start,
int end)
|
BufferedImage[] |
getImages(String imagefile,
int col,
int row,
boolean useMask,
String sequence,
int digit)
|
BufferedImage[] |
getImages(String imagefile,
int col,
int row,
int start,
int end)
|
BufferedImage[] |
getImages(String imagefile,
int col,
int row,
String sequence,
int digit)
|
int |
getMouseX()
|
int |
getMouseY()
|
int |
getRandom(int low,
int hi)
|
int |
getRequestedFPS()
|
int |
getWidth()
|
void |
hideCursor()
|
abstract void |
initResources()
|
boolean |
keyDown(int keyCode)
|
boolean |
keyPressed(int keyCode)
|
boolean |
middleClick()
|
void |
playMusic(String audiofile)
|
void |
playSound(String audiofile)
|
abstract void |
render(Graphics2D g)
|
boolean |
rightClick()
|
void |
setFPS(int fps)
|
void |
setMaskColor(Color c)
|
void |
showCursor()
|
BufferedImage |
takeScreenShot()
|
void |
takeScreenShot(File f)
|
abstract void |
update()
|
bsEngine
public final GameEngine bsEngine
bsGraphics
public final BaseGraphics bsGraphics
bsIO
public final BaseIO bsIO
bsLoader
public final BaseLoader bsLoader
bsInput
public final BaseInput bsInput
bsTimer
public final BaseTimer bsTimer
bsMusic
public final BaseAudio bsMusic
bsSound
public final BaseAudio bsSound
fontManager
public GameFontManager fontManager
GameObject
public GameObject(GameEngine parent)
finish
public void finish()
initResources
public abstract void initResources()
update
public abstract void update()
render
public abstract void render(Graphics2D g)
getRandom
public int getRandom(int low,
int hi)
getWidth
public int getWidth()
getHeight
public int getHeight()
takeScreenShot
public BufferedImage takeScreenShot()
takeScreenShot
public void takeScreenShot(File f)
playMusic
public void playMusic(String audiofile)
playSound
public void playSound(String audiofile)
setFPS
public void setFPS(int fps)
getCurrentFPS
public int getCurrentFPS()
getRequestedFPS
public int getRequestedFPS()
getMouseX
public int getMouseX()
getMouseY
public int getMouseY()
checkPosMouse
public boolean checkPosMouse(int x1,
int y1,
int x2,
int y2)
click
public boolean click()
rightClick
public boolean rightClick()
middleClick
public boolean middleClick()
keyDown
public boolean keyDown(int keyCode)
keyPressed
public boolean keyPressed(int keyCode)
hideCursor
public void hideCursor()
showCursor
public void showCursor()
setMaskColor
public void setMaskColor(Color c)
getImage
public BufferedImage getImage(String imagefile,
boolean useMask)
getImage
public BufferedImage getImage(String imagefile)
getImages
public BufferedImage[] getImages(String imagefile,
int col,
int row,
boolean useMask)
getImages
public BufferedImage[] getImages(String imagefile,
int col,
int row)
getImages
public BufferedImage[] getImages(String imagefile,
int col,
int row,
boolean useMask,
String sequence,
int digit)
getImages
public BufferedImage[] getImages(String imagefile,
int col,
int row,
String sequence,
int digit)
getImages
public BufferedImage[] getImages(String imagefile,
int col,
int row,
boolean useMask,
int start,
int end)
getImages
public BufferedImage[] getImages(String imagefile,
int col,
int row,
int start,
int end)
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
Throwable