RuneHive-Game
Loading...
Searching...
No Matches
GameObject.java
Go to the documentation of this file.
1package com.runehive.game.world.object;
2
3import com.runehive.game.world.Interactable;
4import com.runehive.game.world.entity.Entity;
5import com.runehive.game.world.position.Position;
6import com.runehive.util.generic.GenericAttributes;
7
8/**
9 * Represents a game object.
10 *
11 * @author Michael | Chex
12 */
13public interface GameObject extends Interactable {
14
15 default int getInstancedHeight() {
17 }
18
19 /** Gets the generic attributes. */
21
22 /** Gets the object definition. */
24
25 /** Gets the regional location. */
27
28 /** Gets the width. */
29 int width();
30
31 /** Gets the length. */
32 int length();
33
34 int distance();
35
36 /** Gets the object type. */
38
39 /** Gets the rotation. */
41
42 /** Registers the game object. */
43 void register();
44
45 /** Unregisters the game object. */
46 void unregister();
47
48 /** Determines if this object is active on the world. */
49 boolean active();
50
51 /** Gets the object id. */
52 default int getId() {
53 return getDefinition().getId();
54 }
55
56 void transform(int id);
57
58 void rotate(ObjectDirection direction);
59
60}
Represents a character in the game world, i.e.
Definition Entity.java:13
Represents a single tile on the game world.
Definition Position.java:14
The enumerated type whose elements represent the directions for objects.
The enumerated type whose elements represent all of the object types.
An object implementing Interactable has uses.
void register()
Registers the game object.
ObjectDirection getDirection()
Gets the rotation.
GameObjectDefinition getDefinition()
Gets the object definition.
boolean active()
Determines if this object is active on the world.
ObjectType getObjectType()
Gets the object type.
void rotate(ObjectDirection direction)
Position getPosition()
Gets the regional location.
GenericAttributes getGenericAttributes()
Gets the generic attributes.
void unregister()
Unregisters the game object.
default int getId()
Gets the object id.