T
- Skill enum type used.public abstract class SkillStrategy<T extends Enum<T> & ObjectType> extends ObjectGame
Modifier and Type | Field and Description |
---|---|
protected int |
destX
Destination assignment x.
|
protected int |
destY
Destination assignment y.
|
Constructor and Description |
---|
SkillStrategy(SetupGame setup)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
action(ControlPanelModel<?> panel,
CursorStrategy cursor)
Action executed on cast.
|
String |
getDescription()
Get skill description.
|
int |
getLevel()
Get skill level.
|
String |
getName()
Get skill name.
|
int |
getPriority()
Set priority level.
|
abstract T |
getType()
Get the id.
|
boolean |
isActive()
Get active state.
|
boolean |
isIgnored()
Get ignorance state.
|
boolean |
isOrder()
Check if skill is an order or a simple button.
|
boolean |
isOver()
Check if cursor is over the skill.
|
abstract boolean |
isOver(CursorStrategy cursor)
Check if the cursor is over the skill button.
|
boolean |
isSelected()
Get skill selection state.
|
abstract void |
onClicked(ControlPanelModel<?> panel)
Action called when clicked on skill from panel.
|
abstract void |
renderOnMap(com.b3dgs.lionengine.Graphic g,
CursorStrategy cursor,
CameraStrategy camera)
Rendering routine on map.
|
abstract void |
renderOnPanel(com.b3dgs.lionengine.Graphic g)
Rendering routine on panel.
|
void |
setActive(boolean state)
Set active state (true when using).
|
void |
setIgnore(boolean state)
Set ignorance state (it can be used to hide a certain part of skills).
|
void |
setLevel(int level)
Set skill level.
|
void |
setOrder(boolean state)
Set order state (an order will require a left click on map to assign it).
|
void |
setPriority(int priority)
Set the priority.
|
void |
setSelected(boolean state)
Set skill selection state.
|
abstract void |
updateOnMap(double extrp,
CameraStrategy camera,
CursorStrategy cursor)
Update routine on map.
|
void |
updateOnPanel(CursorStrategy cursor,
ControlPanelModel<?> panel)
Update routine on panel.
|
destroy, getDataAnimation, getDataBoolean, getDataCollision, getDataDouble, getDataInteger, getDataRoot, getDataString, getId, isDestroyed, loadData
protected int destX
protected int destY
public SkillStrategy(SetupGame setup)
<skill name="Name" description="Description">
</skill>
setup
- The setup skill used.public abstract void updateOnMap(double extrp, CameraStrategy camera, CursorStrategy cursor)
extrp
- The extrapolation value.camera
- The camera reference.cursor
- The cursor reference.public abstract void renderOnMap(com.b3dgs.lionengine.Graphic g, CursorStrategy cursor, CameraStrategy camera)
g
- The graphic output.cursor
- The cursor reference.camera
- The camera reference.public abstract void renderOnPanel(com.b3dgs.lionengine.Graphic g)
g
- The graphic output.public abstract void action(ControlPanelModel<?> panel, CursorStrategy cursor)
panel
- The panel reference.cursor
- The cursor reference.public abstract boolean isOver(CursorStrategy cursor)
cursor
- The cursor reference.true
if over, false
else.public abstract void onClicked(ControlPanelModel<?> panel)
panel
- The panel reference.public abstract T getType()
public void updateOnPanel(CursorStrategy cursor, ControlPanelModel<?> panel)
cursor
- The cursor reference.panel
- The control panel reference.public void setLevel(int level)
level
- The level to set.public void setSelected(boolean state)
state
- The selection state.public void setActive(boolean state)
state
- The active state.public void setOrder(boolean state)
state
- The order state.public void setPriority(int priority)
priority
- The priority number (0 = first rendered).public void setIgnore(boolean state)
state
- The ignorance state.public int getPriority()
public int getLevel()
public String getName()
public String getDescription()
public boolean isOrder()
public boolean isIgnored()
public boolean isActive()
true
if currently in use, false
else.public boolean isSelected()
public boolean isOver()
true
if over, false
else.Copyright © 2014 Byron 3D Games Studio. All rights reserved.