1package com.runehive.content.skill;
3import com.runehive.game.Animation;
4import com.runehive.game.action.Action;
5import com.runehive.game.world.entity.mob.Mob;
6import com.runehive.game.world.position.Position;
8import java.util.Optional;
55 getMob().action.clearNonWalkableActions();
58 getMob().action.execute(
this,
false);
72 public abstract void init();
84 public abstract Optional<SkillAnimation>
animation();
SkillAnimation(Animation animation, int delay, boolean instant)
Constructs a new SkillAnimation;.
final boolean instant
Determines if this animation should run when the task is submitted.
final int delay
The delay for this set.
SkillAnimation(Animation animation, int delay)
Constructs a new SkillAnimation;.
final Animation animation
The animation for this set.
final void onSchedule()
A function executed on registration.
SkillAction(Mob mob, Optional< Position > position, boolean instant)
Creates a new Action randomevent.
abstract Optional< SkillAnimation > animation()
The skill animation to execute.
final void execute()
A function representing the unit of work that will be carried out.
abstract void onExecute()
The method which is called on intervals of the specified #delay;.
SkillAction(Mob mob, Optional< Position > position, int delay, boolean instant)
Creates a new Action randomevent.
final void start()
Attempts to start the skill.
int animationCounter
The animation counter of this task.
final Optional< Position > position
The position we should face.
abstract double experience()
The experience given from this action.
abstract boolean canInit()
Determines if this action can be initialized.
boolean ignore()
Determines if future skill actions from the same type should be ignored.
abstract void init()
Any functionality that should be handled when this action is submitted.
abstract int skill()
The skill we should hand to experience to.
Class that models a single animation used by an entity.
T getMob()
Gets the player.
final T mob
The Mob associated with this ActionEvent.
Action(T mob, int delay, boolean instant)
Creates a new Action randomevent.
synchronized final void cancel()
Cancels all subsequent executions.
boolean canRun()
Determines if the task can be ran.
final boolean instant
If execution happens instantly upon being scheduled.
int delay
The cyclic delay.