Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.huguesjohnson.tiamat
Class BaseAdventureGame

    java.lang.Object
      com.huguesjohnson.tiamat.BaseAdventureGame

All Implemented Interfaces:
  IAdventureCommands, java.lang.Runnable

    public abstract class BaseAdventureGame

extends java.lang.Object
implements java.lang.Runnable, IAdventureCommands

BaseAdventureGame - abstract class containing functions used by an adventure style game

Author:
  Hugues Johnson

Nested Class Summary
`static class` | `BaseAdventureGame.ConfigKeys` enum containing all supported configuration keys.

Nested classes/interfaces inherited from interface com.huguesjohnson.tiamat.IAdventureCommands
`IAdventureCommands.Actions, IAdventureCommands.Parameters`

Field Summary
`protected Sequence` | `activeSequence`
`protected AudioPlayer` | `audioPlayer`
`protected java.lang.String` | `baseDataPath`
`protected StringTable` | `config`
`protected java.lang.String` | `configFilePath`
`protected java.lang.String` | `currentAudioFile`
`protected Location` | `currentLocation`
`protected java.lang.String` | `currentLocationName`
`protected AdventureFrame` | `frame`
`protected GameDataManager` | `gameDataManager`
`protected java.lang.String` | `gameInProgressDataPath`
`protected BaseGameState` | `gameState`
`protected java.lang.String` | `lastOpenPath`
`protected static java.lang.String` | `NULLSTRING`
`protected PlayerCharacter` | `player`
`protected GameScript` | `script`

Constructor Summary
`BaseAdventureGame(java.lang.String configFilePath, AdventureFrame frame)` Create a new instance of BaseAdventureGame.

Method Summary
`protected abstract Selection[]` | `getCustomDefaultMenuSelections()` Returns an array of type Selection containing the custom menu entries.
`abstract java.lang.String` | `getTitleScreenText()` Returns the text to display on the title screen.
`void` | `loadGame()`
`abstract void` | `onExit()` Event that fires when exit is complete.
`protected abstract void` | `processCustomGameEvent(Event event)` Process a game event not handled in BaseAdventureGame.
`void` | `run()` Starts the thread.
`void` | `saveGame()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### configFilePath

    protected java.lang.String configFilePath

### config

    protected StringTable config

### frame

    protected AdventureFrame frame

### gameState

    protected BaseGameState gameState

### player

    protected PlayerCharacter player

### currentAudioFile

    protected java.lang.String currentAudioFile

### audioPlayer

    protected AudioPlayer audioPlayer

### gameInProgressDataPath

    protected java.lang.String gameInProgressDataPath

### baseDataPath

    protected java.lang.String baseDataPath

### currentLocation

    protected Location currentLocation

### currentLocationName

    protected java.lang.String currentLocationName

### gameDataManager

    protected GameDataManager gameDataManager

### script

    protected GameScript script

### activeSequence

    protected Sequence activeSequence

### lastOpenPath

    protected java.lang.String lastOpenPath

### NULLSTRING

    protected static final java.lang.String NULLSTRING

See Also:
  Constant Field Values

Constructor Detail

### BaseAdventureGame

    public BaseAdventureGame(java.lang.String configFilePath,
                             AdventureFrame frame)

  Create a new instance of BaseAdventureGame.

  Parameters:
    `configFilePath` - The path to the configuration file.
    `frame` - The frame for the game.

Method Detail

### run

    public void run()

  Starts the thread.

  Specified by:
    `run` in interface `java.lang.Runnable`

### saveGame

    public void saveGame()

### loadGame

    public void loadGame()

### getCustomDefaultMenuSelections

    protected abstract Selection[] getCustomDefaultMenuSelections()

  Returns an array of type Selection containing the custom menu entries.

  Returns:
    An array of type Selection containing the custom menu entries.

### processCustomGameEvent

    protected abstract void processCustomGameEvent(Event event)

  Process a game event not handled in BaseAdventureGame.

  Parameters:
    `event` - The event to process.

### onExit

    public abstract void onExit()

  Event that fires when exit is complete.

### getTitleScreenText

    public abstract java.lang.String getTitleScreenText()

  Returns the text to display on the title screen.

  Returns:
    The text to display on the title screen.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hugues Johnson