T
- Skill enum type used.public abstract class SkillRts<T extends java.lang.Enum<T> & com.b3dgs.lionengine.game.ObjectType>
extends com.b3dgs.lionengine.game.ObjectGame
Constructor and Description |
---|
SkillRts(com.b3dgs.lionengine.game.SetupGame setup)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
action(ControlPanelModel<?> panel,
CursorRts cursor)
Action executed on cast.
|
java.lang.String |
getDescription()
Get skill description.
|
int |
getLevel()
Get skill level.
|
java.lang.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(CursorRts 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,
CursorRts cursor,
CameraRts 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,
CameraRts camera,
CursorRts cursor)
Update routine on map.
|
void |
updateOnPanel(CursorRts cursor,
ControlPanelModel<?> panel)
Update routine on panel.
|
public SkillRts(com.b3dgs.lionengine.game.SetupGame setup)
<skill name="Name" description="Description">
</skill>
setup
- The setup skill used.public abstract void updateOnMap(double extrp, CameraRts camera, CursorRts cursor)
extrp
- The extrapolation value.camera
- The camera reference.cursor
- The cursor reference.public abstract void renderOnMap(com.b3dgs.lionengine.Graphic g, CursorRts cursor, CameraRts 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, CursorRts cursor)
panel
- The panel reference.cursor
- The cursor reference.public abstract boolean isOver(CursorRts 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(CursorRts 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 java.lang.String getName()
public java.lang.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.