|
RuneHive-Game
|
The class which manages Actions executed by mobs.
More...
Public Member Functions | |
| void | cancel () |
Cancels the current Action for the underlying Mob. | |
| void | cancel (String name) |
Purges actions in the queue with a WalkablePolicy of NON_WALKABLE. | |
| void | clearNonWalkableActions () |
Purges actions in the queue with a WalkablePolicy of NON_WALKABLE. | |
| Action<?> | getCurrentAction () |
| Gets the current action. | |
| void | reset () |
Resets all the actions for the underlying Mob. | |
| void | sequence () |
| Sequences the pending actions, and as soon as the current action has stopped, it executes the head of the queue. | |
| String | toString () |
Package Functions | |
| public< A extends Action<?> > void | execute (A action) |
| public< A extends Action<?> > void | execute (A action, boolean override) |
Adds an Action to the queue. | |
| public< A extends Action<?> > void | queue (A action) |
Queues the specified action. | |
Private Member Functions | |
| void | cancelQueuedActions () |
| Cancels all the queued actions by stopping them and removing all elements from the queue. | |
Private Attributes | |
| Action<?> | currentAction = null |
| The current action. | |
| final Queue< Action<?> > | queuedActions = new ArrayDeque<>() |
A queue of Action object. | |
The class which manages Actions executed by mobs.
Definition at line 16 of file ActionManager.java.
| void com.runehive.game.action.ActionManager.cancel | ( | ) |
Cancels the current Action for the underlying Mob.
Definition at line 74 of file ActionManager.java.
References currentAction.
Referenced by reset().
| void com.runehive.game.action.ActionManager.cancel | ( | String | name | ) |
Purges actions in the queue with a WalkablePolicy of NON_WALKABLE.
Definition at line 109 of file ActionManager.java.
References currentAction, and queuedActions.
|
private |
Cancels all the queued actions by stopping them and removing all elements from the queue.
Definition at line 68 of file ActionManager.java.
References com.runehive.game.task.Task.cancel(), and queuedActions.
Referenced by reset().
| void com.runehive.game.action.ActionManager.clearNonWalkableActions | ( | ) |
Purges actions in the queue with a WalkablePolicy of NON_WALKABLE.
Definition at line 88 of file ActionManager.java.
References currentAction, com.runehive.game.action.policy.WalkablePolicy.NON_WALKABLE, queuedActions, and com.runehive.game.action.policy.WalkablePolicy.WALKABLE.
Referenced by com.runehive.content.skill.impl.magic.spell.impl.HighAlchemy.execute(), and com.runehive.content.skill.impl.magic.spell.impl.LowAlchemy.execute().
|
package |
Definition at line 38 of file ActionManager.java.
References execute().
Referenced by com.runehive.content.skill.impl.magic.teleport.Teleportation.activateOverride(), com.runehive.content.skill.impl.magic.teleport.Teleportation.activateOverride(), com.runehive.content.wintertodt.Wintertodt.chopRoot(), com.runehive.content.skill.impl.crafting.impl.Jewellery.click(), com.runehive.content.skill.impl.crafting.impl.Spinning.click(), com.runehive.content.skill.impl.firemaking.Firemaking.clickObject(), com.runehive.content.skill.impl.hunter.Hunter.clickObject(), com.runehive.content.skill.impl.woodcutting.Woodcutting.clickObject(), com.runehive.content.skill.impl.crafting.impl.Glass.craft(), com.runehive.content.skill.impl.crafting.impl.Stringing.craft(), com.runehive.content.emote.Emote.execute(), execute(), com.runehive.content.wintertodt.Wintertodt.feedBrazier(), com.runehive.content.wintertodt.Wintertodt.fixBrazier(), com.runehive.content.wintertodt.Wintertodt.fletch(), com.runehive.content.wintertodt.Wintertodt.lightBrazier(), com.runehive.content.shootingstar.ShootingStar.mine(), com.runehive.content.wintertodt.Wintertodt.mixHerb(), sequence(), com.runehive.content.wintertodt.Wintertodt.shootFlame(), com.runehive.content.skill.impl.smithing.Smelting.smelt(), com.runehive.content.skill.impl.crafting.Crafting.start(), com.runehive.content.skill.impl.fishing.Fishing.start(), com.runehive.content.skill.impl.fletching.Fletching.start(), com.runehive.content.skill.impl.mining.Mining.start(), com.runehive.content.wintertodt.Wintertodt.takeHerb(), com.runehive.content.skill.impl.magic.teleport.Teleportation.teleport(), com.runehive.content.skill.impl.thieving.WallSafe.thieve(), com.runehive.content.skill.impl.cooking.Cooking.useItem(), com.runehive.content.skill.impl.firemaking.Firemaking.useItem(), com.runehive.content.skill.impl.herblore.Herblore.useItem(), and com.runehive.content.skill.impl.prayer.BoneSacrifice.useItem().
|
package |
Adds an Action to the queue.
Definition at line 43 of file ActionManager.java.
References currentAction, and com.runehive.game.world.World.schedule().
| Action<?> com.runehive.game.action.ActionManager.getCurrentAction | ( | ) |
Gets the current action.
Definition at line 124 of file ActionManager.java.
References currentAction.
|
package |
Queues the specified action.
Definition at line 34 of file ActionManager.java.
References queuedActions.
| void com.runehive.game.action.ActionManager.reset | ( | ) |
Resets all the actions for the underlying Mob.
Definition at line 82 of file ActionManager.java.
References cancel(), and cancelQueuedActions().
| void com.runehive.game.action.ActionManager.sequence | ( | ) |
Sequences the pending actions, and as soon as the current action has stopped, it executes the head of the queue.
Definition at line 25 of file ActionManager.java.
References currentAction, execute(), and queuedActions.
| String com.runehive.game.action.ActionManager.toString | ( | ) |
Definition at line 129 of file ActionManager.java.
References currentAction, and queuedActions.
|
private |
The current action.
Definition at line 22 of file ActionManager.java.
Referenced by cancel(), cancel(), clearNonWalkableActions(), execute(), getCurrentAction(), sequence(), and toString().
|
private |
A queue of Action object.
Definition at line 19 of file ActionManager.java.
Referenced by cancel(), cancelQueuedActions(), clearNonWalkableActions(), queue(), sequence(), and toString().