public class ObjectPattern
extends java.lang.Object
Constructor and Description |
---|
ObjectPattern(java.lang.String id,
java.lang.String mainTexture,
java.lang.String portrait,
java.lang.String sound,
ActionPattern action,
int gold,
java.util.List<RandomItem> items,
InventoryLock lock)
Game object pattern constructor(with static texture)
|
ObjectPattern(java.lang.String id,
java.lang.String mainTexture,
java.lang.String portrait,
java.lang.String sound,
int frames,
int fWidth,
int fHeight,
ActionPattern action,
int gold,
java.util.List<RandomItem> items,
InventoryLock lock)
Game object pattern constructor(with animated texture)
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Return ID of this pattern object
|
TargetableObject |
make(org.newdawn.slick.GameContainer gc)
Creates new game object from this pattern
|
public ObjectPattern(java.lang.String id, java.lang.String mainTexture, java.lang.String portrait, java.lang.String sound, int frames, int fWidth, int fHeight, ActionPattern action, int gold, java.util.List<RandomItem> items, InventoryLock lock)
id
- ID for objectmainTexture
- Name of main texture of objectportrait
- Name of portrait for objectsound
- Name of audio file for object soundframes
- Number of frames for animationfWidth
- Width of one frame for animationfHeight
- Height of one frame for animationaction
- Action pattern for object(on click)gold
- Amount of gold for object inventoryitems
- Items for object inventorylock
- Lock for object inventorypublic ObjectPattern(java.lang.String id, java.lang.String mainTexture, java.lang.String portrait, java.lang.String sound, ActionPattern action, int gold, java.util.List<RandomItem> items, InventoryLock lock)
id
- ID for objectmainTexture
- Name of main texture of objectportrait
- Name of portrait for objectsound
- Name of audio file for object soundaction
- Action pattern for object(on click)gold
- Amount of gold for object inventoryitems
- Items for object inventorylock
- Lock for object inventorypublic java.lang.String getId()
public TargetableObject make(org.newdawn.slick.GameContainer gc) throws org.newdawn.slick.SlickException, java.io.IOException, java.awt.FontFormatException
org.newdawn.slick.SlickException
java.io.IOException
java.awt.FontFormatException