1package com.runehive.game.task.impl;
3import com.runehive.game.Animation;
4import com.runehive.game.task.Task;
5import com.runehive.game.world.entity.mob.Mob;
6import com.runehive.game.world.entity.mob.player.ForceMovement;
7import com.runehive.game.world.position.Position;
35 return mob.forceMovement ==
null;
40 mob.getCombat().reset();
49 final int x =
start.getX() +
end.getX();
50 final int y =
start.getY() +
end.getY();
52 mob.setForceMovement(
null);
Class that models a single animation used by an entity.
synchronized final void cancel()
Cancels all subsequent executions.
Task(boolean instant, int delay)
Creates a new Task.
int delay
The cyclic delay.
ForceMovementTask(Mob mob, int delay, ForceMovement forceMovement, Animation animation)
boolean canSchedule()
A function executed on registration.
ForceMovementTask(Mob mob, int delay, int moveDelay, ForceMovement forceMovement, Animation animation)
final ForceMovement forceMovement
final Animation animation
void execute()
A function representing the unit of work that will be carried out.
void onSchedule()
A function executed on registration.
Represents a single tile on the game world.