RuneHive-Game
Loading...
Searching...
No Matches
ArdougneJumpGapInteraction.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.agility.obstacle.impl;
2
3import com.runehive.content.skill.impl.agility.obstacle.ObstacleInteraction;
4import com.runehive.game.Animation;
5import com.runehive.game.task.Task;
6import com.runehive.game.world.World;
7import com.runehive.game.world.entity.mob.player.Player;
8import com.runehive.game.world.position.Position;
9
11 @Override
12 default void start(Player player) {
13 }
14
15 @Override
16 default void onExecution(Player player, Position start, Position end) {
17 World.schedule(new Task(1) {
18 int ticks = 0;
19
20 @Override
21 public void execute() {
22 switch (ticks++) {
23 case 1:
24 player.face(end);
25 player.animate(new Animation(2586));
26 break;
27 case 2:
28 player.move(end);
29 player.animate(new Animation(2588));
30 cancel();
31 break;
32 }
33 }
34 });
35 }
36
37 @Override
38 default void onCancellation(Player player) {
39 }
40}
Class that models a single animation used by an entity.
A game representing a cyclic unit of work.
Definition Task.java:11
Represents the game world.
Definition World.java:46
static void schedule(Task task)
Submits a new event.
Definition World.java:247
void move(Position position)
Moves the mob to a set position.
Definition Mob.java:340
void face(GameObject object)
Sets the client update flag to face a certain direction.
Definition Mob.java:289
This class represents a character controlled by a player.
Definition Player.java:125
Represents a single tile on the game world.
Definition Position.java:14
default void execute(Player player, Obstacle next, Position start, Position end, int level, float experience, int ordinal)