RuneHive-Game
Loading...
Searching...
No Matches
Obstacle.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.agility.obstacle;
2
3import com.runehive.game.world.entity.mob.player.Player;
4import com.runehive.game.world.position.Position;
5
6public final class Obstacle {
7 private final ObstacleType type;
9 private final Position start;
10 private final Position end;
11 private final int level;
12 private final float experience;
13 private final int ordinal;
14 private final Obstacle next;
15
17 type = builder.type;
19 start = builder.start;
20 end = builder.end;
21 level = builder.level;
22 experience = builder.experience;
23 ordinal = builder.ordinal;
24 next = builder.next;
25 }
26
28 this.objectPosition = objectPosition;
29 }
30
32 return objectPosition;
33 }
34
35 public Position getStart() {
36 return start;
37 }
38
39 public Position getEnd() {
40 return end;
41 }
42
43 public Obstacle getNext() {
44 return next;
45 }
46
47 public int getOrdinal() {
48 return ordinal;
49 }
50
52 return type;
53 }
54
55 public void execute(Player player) {
56 type.execute(player, next, start, end, level, experience, ordinal);
57 }
58
59 @Override
60 public String toString() {
61 return "OBSTACLE [Type: " + type + ", Start: " + start + ", End: " + end + ", Level: " + level + ", Experience: " + experience + ", Ordinal: " + ordinal + "]";
62 }
63
64}
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