RuneHive-Game
Loading...
Searching...
No Matches
SeersClimbInteraction.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
12 @Override
13 default void start(Player player) {
14 }
15
16 @Override
17 default void onExecution(Player player, Position start, Position end) {
18 player.animate(new Animation(getAnimation()));
19 World.schedule(new Task(1) {
20 int count = 0;
21
22 @Override
23 public void execute() {
24 if (count == 0) {
25 player.move(new Position(player.getX(), player.getY(), player.getHeight() + 1));
26 player.animate(new Animation(1118));
27 } else if (count == 2) {
28 player.move(end);
29 player.animate(new Animation(65535));
30 this.cancel();
31 }
32 count++;
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
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)
default void onExecution(Player player, Position start, Position end)