RuneHive-Game
Loading...
Searching...
No Matches
SwingAcrossCableInteraction.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
19 @Override
20 public void execute() {
21 player.animate(new Animation(getAnimation()));
22 }
23 });
24 }
25
26 @Override
27 default void onCancellation(Player player) {
28 }
29}
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
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)