|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.game.AbstractBaseGame
de.rico.adventure.main.Adventure
public class Adventure
This class is the main class for an adventure game, that is built with the framework. It implements the singleton pattern.
Method Summary | |
---|---|
void |
abortCloseUpMode()
Call this method to abort the close up mode, if it should be aborted without the need of the player to abort it manually. |
void |
draw(javax.media.opengl.GL gl)
This method is used to draw the scene and its content. |
Chapter |
getActiveChapter()
Returns the currently active chapter of the game. |
static Adventure |
getInstance()
Returns the singleton instance of the game. |
ShadowType |
getShadowType()
Returns the current shadow type used in the game. |
void |
initResources(javax.media.opengl.GLDrawable gld,
javax.media.opengl.GL gl,
int width,
int height)
This method is used to initialize all the objects and resources that are neccessary at startup of the game. |
static void |
main(java.lang.String[] args)
The main method of the adventure game. |
void |
setActiveChapter(java.lang.String path)
Sets the active chapter of the game. |
void |
setBackupCamPersp(int perspId)
Method to backup the current camera perspective id, if the game wants to change to CLOSE_UP mode. |
void |
setHotSpotThatTriggeredCloseUpMode(AbstractInteractiveHotspot hs)
Method that specifies the hotspot that was used to set the camera to CLOSE_UP mode. |
void |
setLoadingInfoText(java.lang.String text)
Sets the text that gets displayed as the loading info. |
void |
setShadowType(ShadowType type)
Sets the shadow type to use in the game. |
void |
showLoadingInfo(java.lang.String backgroundImage)
This method can be used to display information on screen, while the render thread actually is busy with some work. |
void |
update(long elapsedTime)
This method is used to update the scene and its content. |
Methods inherited from class de.rico.engine.game.AbstractBaseGame |
---|
display, displayChanged, enableBackFaceCulling, getMainFrame, getOGLCanvas, init, initCamera, isSetDisplayFPS, resetElapsedTime, reshape, setDisplayFPS, setDisplayMode, start, stop |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Adventure getInstance()
public void setLoadingInfoText(java.lang.String text)
text
- loading info textpublic void setBackupCamPersp(int perspId)
perspId
- id of the camera perspective to backuppublic void setHotSpotThatTriggeredCloseUpMode(AbstractInteractiveHotspot hs)
hs
- interactive hotspot that triggered the CLOSE_UP modepublic void abortCloseUpMode()
public ShadowType getShadowType()
public void setShadowType(ShadowType type)
type
- value from the ShadowType enumerationpublic void showLoadingInfo(java.lang.String backgroundImage)
backgroundImage
- path to image file that ought to be
displayed during the loading processpublic void initResources(javax.media.opengl.GLDrawable gld, javax.media.opengl.GL gl, int width, int height)
GameIface
initResources
in interface GameIface
initResources
in class AbstractBaseGame
gld
- GLDrawable objectgl
- GL objectwidth
- window width (important viewport initialisation)height
- window height (important viewport initialisation)public void update(long elapsedTime)
GameIface
update
in interface GameIface
update
in class AbstractBaseGame
elapsedTime
- time between two framespublic void draw(javax.media.opengl.GL gl)
GameIface
draw
in interface GameIface
draw
in class AbstractBaseGame
public void setActiveChapter(java.lang.String path)
path
- path to the chapter file (.chp) to load the
chapter frompublic Chapter getActiveChapter()
public static void main(java.lang.String[] args)
args
- argument string --> args[0] must be the path to the
xml file that specifies the games start chapter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |