RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.world.Interactable Interface Reference

An object implementing Interactable has uses. More...

Inheritance diagram for com.runehive.game.world.Interactable:

Public Member Functions

default int getHeight ()
Position getPosition ()
default int getX ()
default int getY ()
int length ()
int width ()

Static Public Member Functions

static Interactable create (Position position)
 Creates a new instance of an Interactable.
static Interactable create (Position position, int width, int length)
 Creates a new instance of an Interactable.

Detailed Description

An object implementing Interactable has uses.

Author
Michael | Chex

Definition at line 10 of file Interactable.java.

Member Function Documentation

◆ create() [1/2]

Interactable com.runehive.game.world.Interactable.create ( Position position)
static

Creates a new instance of an Interactable.

Parameters
positionthe position.
Returns
a new instance

Definition at line 42 of file Interactable.java.

42 {
43 return new Interactable() {
44 @Override
45 public Position getPosition() {
46 return position;
47 }
48
49 @Override
50 public int width() {
51 return 1;
52 }
53
54 @Override
55 public int length() {
56 return 1;
57 }
58 };
59 }

References getPosition(), length(), and width().

Referenced by com.runehive.game.world.pathfinding.path.impl.SimplePathFinder.addWalks(), com.runehive.game.world.pathfinding.path.impl.DijkstraPathFinder.find(), com.runehive.game.world.entity.mob.movement.waypoint.PickupWaypoint.PickupWaypoint(), com.runehive.game.world.entity.mob.Mob.walkExactlyTo(), com.runehive.game.world.entity.mob.Mob.walkTo(), com.runehive.util.Utility.within(), and com.runehive.content.activity.impl.kraken.KrakenActivityListener.withinDistance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create() [2/2]

Interactable com.runehive.game.world.Interactable.create ( Position position,
int width,
int length )
static

Creates a new instance of an Interactable.

Parameters
positionthe position.
widththe width
lengththe length
Returns
a new instance

Definition at line 69 of file Interactable.java.

69 {
70 return new Interactable() {
71 @Override
72 public Position getPosition() {
73 return position;
74 }
75
76 @Override
77 public int width() {
78 return width;
79 }
80
81 @Override
82 public int length() {
83 return length;
84 }
85 };
86 }

References getPosition(), length(), and width().

Here is the call graph for this function:

◆ getHeight()

default int com.runehive.game.world.Interactable.getHeight ( )
Returns
the z coordinate of the getPosition()

Implemented in com.runehive.game.world.entity.Entity.

Definition at line 26 of file Interactable.java.

26 {
27 return getPosition().getHeight();
28 }

References com.runehive.game.world.position.Position.getHeight(), and getPosition().

Referenced by com.runehive.game.world.object.StaticGameObject.active(), com.runehive.game.world.pathfinding.path.impl.AStarPathFinder.find(), com.runehive.game.world.object.StaticGameObject.register(), com.runehive.game.world.region.Region.skip(), com.runehive.game.world.object.StaticGameObject.unregister(), and com.runehive.util.Utility.withinViewingDistance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPosition()

Position com.runehive.game.world.Interactable.getPosition ( )

◆ getX()

default int com.runehive.game.world.Interactable.getX ( )
Returns
the x coordinate of the getPosition()

Implemented in com.runehive.game.world.entity.Entity.

Definition at line 16 of file Interactable.java.

16 {
17 return getPosition().getX();
18 }

References getPosition(), and com.runehive.game.world.position.Position.getX().

Referenced by com.runehive.util.Utility.findBestInside(), com.runehive.util.Utility.getDistance(), com.runehive.util.Utility.inRange(), and com.runehive.util.Utility.withinViewingDistance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getY()

default int com.runehive.game.world.Interactable.getY ( )
Returns
the y coordinate of the getPosition()

Implemented in com.runehive.game.world.entity.Entity.

Definition at line 21 of file Interactable.java.

21 {
22 return getPosition().getY();
23 }

References getPosition(), and com.runehive.game.world.position.Position.getY().

Referenced by com.runehive.util.Utility.findBestInside(), com.runehive.util.Utility.getDistance(), com.runehive.util.Utility.inRange(), and com.runehive.util.Utility.withinViewingDistance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ length()

◆ width()

int com.runehive.game.world.Interactable.width ( )

The documentation for this interface was generated from the following file: