RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
ForceMovement.java
1package com.osroyale.game.world.entity.mob.player;
2
3import com.osroyale.game.world.entity.mob.Direction;
4import com.osroyale.game.world.position.Position;
5
34
35public class ForceMovement {
36 private final Position start;
37 private final Position end;
38 private final int speed;
39 private final int reverseSpeed;
40 private final int direction;
41
42 public ForceMovement(Position start, Position end, int speed, int reverseSpeed, Direction direction) {
43 this.start = start;
44 this.end = end;
45 this.speed = speed;
46 this.reverseSpeed = reverseSpeed;
47 switch (direction) {
48 case NORTH:
49 this.direction = 0;
50 break;
51 case EAST:
52 this.direction = 1;
53 break;
54 case SOUTH:
55 this.direction = 2;
56 break;
57 case WEST:
58 this.direction = 3;
59 break;
60 default:
61 throw new IllegalArgumentException(String.format("Invalid force movement direction=%s", direction.name()));
62 }
63 }
64
65 public Position getStart() {
66 return start;
67 }
68
69 public Position getEnd() {
70 return end;
71 }
72
73 public int getSpeed() {
74 return speed;
75 }
76
77 public int getReverseSpeed() {
78 return reverseSpeed;
79 }
80
81 public int getDirection() {
82 return direction;
83 }
84
85}