RuneHive-Game
Loading...
Searching...
No Matches
FlameWalk.java
Go to the documentation of this file.
1
package
com.runehive.content.wintertodt.actions;
2
3
import
com.runehive.game.action.Action;
4
import
com.runehive.game.action.policy.WalkablePolicy;
5
import
com.runehive.game.world.entity.mob.npc.Npc;
6
import
com.runehive.game.world.position.Position;
7
8
public
class
FlameWalk
extends
Action
<Npc> {
9
10
public
FlameWalk
(
Npc
mob
) {
11
super(
mob
, 1);
12
}
13
14
@Override
15
public
WalkablePolicy
getWalkablePolicy
() {
16
return
WalkablePolicy
.
WALKABLE
;
17
}
18
19
@Override
20
public
String
getName
() {
21
return
"Walk flame"
;
22
}
23
24
@Override
25
protected
void
execute
() {
26
if
(
getMob
().getPosition().equals(
new
Position
(1630, 4006)) ||
getMob
().getPosition().equals(
new
Position
(1629, 4007)) ||
getMob
().getPosition().equals(
new
Position
(1631, 4007))) {
27
getMob
().action.getCurrentAction().cancel();
28
getMob
().unregister();
29
}
30
}
31
}
com.runehive.content.wintertodt.actions.FlameWalk.execute
void execute()
A function representing the unit of work that will be carried out.
Definition
FlameWalk.java:25
com.runehive.content.wintertodt.actions.FlameWalk.getName
String getName()
Gets the name of this action.
Definition
FlameWalk.java:20
com.runehive.content.wintertodt.actions.FlameWalk.FlameWalk
FlameWalk(Npc mob)
Definition
FlameWalk.java:10
com.runehive.content.wintertodt.actions.FlameWalk.getWalkablePolicy
WalkablePolicy getWalkablePolicy()
Gets the WalkablePolicy of this action.
Definition
FlameWalk.java:15
com.runehive.game.action.Action.getMob
T getMob()
Gets the player.
Definition
Action.java:44
com.runehive.game.action.Action.mob
final T mob
The Mob associated with this ActionEvent.
Definition
Action.java:15
com.runehive.game.action.Action.Action
Action(T mob, int delay, boolean instant)
Creates a new Action randomevent.
Definition
Action.java:24
com.runehive.game.world.entity.mob.npc.Npc
Represents a non-player character in the in-game world.
Definition
Npc.java:29
com.runehive.game.world.position.Position
Represents a single tile on the game world.
Definition
Position.java:14
com.runehive.game.action.policy.WalkablePolicy
A queue policy determines whether the action can occur while walking.
Definition
WalkablePolicy.java:9
com.runehive.game.action.policy.WalkablePolicy.WALKABLE
WALKABLE
This indicates actions may occur while walking.
Definition
WalkablePolicy.java:12