|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmhframework.MHDataModel
public abstract class MHDataModel
A facade for game engine utilities in MHFramework. This class is currently being redesigned to behave more like an actual facade that simplifies the usage of these vital subsystems.
This is the generic base class for managing game data. Due to the application-specific nature of a game's data model, this class must be extended and specialized in order to be used.
Subclasses of MHDataModel should:
Here is a primitive outline which may be used as a starting point for your customized data model. Note the private member INSTANCE, the private constructor, and the getInstance() method.
// BEGIN COPIED CODE ------------------------------------------------ import mhframework.*; import java.awt.*; public class MHDataModelTest extends MHDataModel { private static MHDataModelTest INSTANCE = new MHDataModelTest(); private MHDataModelTest() { } public static MHDataModel getInstance() { return INSTANCE; } } // END COPIED CODE --------------------------------------------------
Constructor Summary | |
---|---|
MHDataModel()
|
Method Summary | |
---|---|
static MHMediaTracker |
getMediaTracker()
|
MHMidiPlayer |
getMidiPlayer()
|
MHSoundManager |
getSoundManager()
Returns a reference to the sound manager. |
static MHTileSetManager |
getTileSetManager()
Returns a reference to the tile set manager. |
boolean |
isProgramOver()
Determines whether the entire program has finished executing. |
java.awt.Image |
loadImage(java.lang.String filename)
|
javax.sound.midi.Sequence |
loadMidiFile(java.lang.String filename)
|
int |
loadSoundFile(java.lang.String filename)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MHDataModel()
Method Detail |
---|
public MHSoundManager getSoundManager()
public int loadSoundFile(java.lang.String filename)
public static MHTileSetManager getTileSetManager()
public boolean isProgramOver()
public java.awt.Image loadImage(java.lang.String filename)
public MHMidiPlayer getMidiPlayer()
public javax.sound.midi.Sequence loadMidiFile(java.lang.String filename)
public static MHMediaTracker getMediaTracker()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |