RuneHive-Game
Loading...
Searching...
No Matches
WalkToWaypoint.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.mob.movement.waypoint;
2
3import com.runehive.game.world.entity.mob.Mob;
4import com.runehive.game.world.Interactable;
5import com.runehive.util.Utility;
6
7public class WalkToWaypoint extends Waypoint {
8 private Runnable onDestination;
9
11 super(mob, target);
12 this.onDestination = onDestination;
13 }
14
15 @Override
16 public void onDestination() {
17 mob.movement.reset();
19 onDestination.run();
20 cancel();
21 }
22
23}
synchronized final void cancel()
Cancels all subsequent executions.
Definition Task.java:113
Handles the mob class.
Definition Mob.java:66
WalkToWaypoint(Mob mob, Interactable target, Runnable onDestination)
Handles miscellaneous methods.
Definition Utility.java:27
static Position findBestInside(Interactable source, Interactable target)
Definition Utility.java:498
An object implementing Interactable has uses.