com.brackeen.javagamebook.state
Class ResourceManager
java.lang.Object
com.brackeen.javagamebook.state.ResourceManager
public class ResourceManager
- extends java.lang.Object
The ResourceManager class loads resources like images and
sounds.
|
Constructor Summary |
ResourceManager(java.awt.GraphicsConfiguration gc)
Creates a new ResourceManager with the specified
GraphicsConfiguration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gc
private java.awt.GraphicsConfiguration gc
soundManager
private SoundManager soundManager
midiPlayer
private MidiPlayer midiPlayer
ResourceManager
public ResourceManager(java.awt.GraphicsConfiguration gc)
- Creates a new ResourceManager with the specified
GraphicsConfiguration.
loadImage
public java.awt.Image loadImage(java.lang.String name)
- Gets an image from the images/ directory.
getMirrorImage
public java.awt.Image getMirrorImage(java.awt.Image image)
getFlippedImage
public java.awt.Image getFlippedImage(java.awt.Image image)
getScaledImage
private java.awt.Image getScaledImage(java.awt.Image image,
float x,
float y)
getResource
public java.net.URL getResource(java.lang.String filename)
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String filename)
loadSound
public Sound loadSound(java.lang.String name)
loadSequence
public javax.sound.midi.Sequence loadSequence(java.lang.String name)