|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.game.Handler<AbstractItem<TTile>>
com.b3dgs.lionengine.game.hacknslash.AbstractItemHandler<TTile,TSkill,TAttr>
public class AbstractItemHandler<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>
Represents the bag containing all items, and their representation on map. They can be selected and well organized, or placed on the map. The only one constraint is to fit only unsed bag location.
Field Summary |
---|
Fields inherited from class com.b3dgs.lionengine.game.Handler |
---|
elements |
Constructor Summary | |
---|---|
AbstractItemHandler(TileBasedMap<TTile> map,
AbstractControlPanel<TTile,TSkill,TAttr> panel,
Entity owner,
int x,
int y,
int width,
int height,
int boxSize)
Create a new item handler. |
Method Summary | |
---|---|
boolean |
isVisible()
Check if item panel is visible. |
void |
place(int x,
int y)
Set bag representation location. |
void |
render(java.awt.Graphics2D g)
Render items from bag. |
void |
render(java.awt.Graphics2D g,
StrategyCamera camera)
Render items on map. |
void |
setSize(int width,
int height)
Set bag panel size. |
void |
setVisible(boolean state)
Set bag representation visibility state. |
void |
update(Keyboard keyboard,
StrategyCursor cursor)
Update items in bag and on map. |
Methods inherited from class com.b3dgs.lionengine.game.Handler |
---|
add, list, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractItemHandler(TileBasedMap<TTile> map, AbstractControlPanel<TTile,TSkill,TAttr> panel, Entity owner, int x, int y, int width, int height, int boxSize)
map
- map reference.panel
- panel reference.owner
- owner reference (entity owning items).x
- initial panel location x.y
- initial panel location y.width
- initial panel width.height
- initial panel height.boxSize
- size of a box from the bag grid (in pixel).Method Detail |
---|
public void place(int x, int y)
x
- location x.y
- location y.public void setSize(int width, int height)
width
- horizontal size.height
- vertical size.public void update(Keyboard keyboard, StrategyCursor cursor)
cursor
- cursor reference.keyboard
- keyboard reference.public void render(java.awt.Graphics2D g)
g
- graphics output.public void render(java.awt.Graphics2D g, StrategyCamera camera)
g
- graphics output.camera
- camera reference.public void setVisible(boolean state)
state
- visibility state.public boolean isVisible()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |