RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.world.object.ObjectGroup Enum Reference

The group of an object, which indicates its general class (e.g. More...

Public Member Functions

int getValue ()
 Gets the value of this ObjectGroup.
 ObjectGroup (int value)
 Creates the ObjectGroup.

Static Public Member Functions

static Optional< ObjectGroupvalueOf (int value)
 Attempts to find the ObjectGroup with the specified integer value.

Public Attributes

 GROUND_DECORATION =(3)
 The ground decoration object group, which may block a tile.
 INTERACTABLE_OBJECT =(2)
 The interactable object group, for objects that can be clicked and interacted with.
 ROOFING =(4)
 The roof parts that disappear on a camera angle.
 WALL =(0)
 The wall object group, which may block a tile.
 WALL_DECORATION =(1)
 The wall decoration object group, which never blocks a tile.

Private Attributes

final int value
 The integer value of the group.

Detailed Description

The group of an object, which indicates its general class (e.g.

if it's a wall, or a floor decoration).

Author
Artem Batutin artem.nosp@m.batu.nosp@m.tin@g.nosp@m.mail.nosp@m..com
Major
Scu11

Definition at line 14 of file ObjectGroup.java.

Constructor & Destructor Documentation

◆ ObjectGroup()

com.runehive.game.world.object.ObjectGroup.ObjectGroup ( int value)

Creates the ObjectGroup.

Parameters
valueThe integer value of the group. Must be unique.

Definition at line 53 of file ObjectGroup.java.

53 {
54 this.value = value;
55 }

References value.

Member Function Documentation

◆ getValue()

int com.runehive.game.world.object.ObjectGroup.getValue ( )

Gets the value of this ObjectGroup.

Returns
The value.

Definition at line 62 of file ObjectGroup.java.

62 {
63 return value;
64 }

References value.

◆ valueOf()

Optional< ObjectGroup > com.runehive.game.world.object.ObjectGroup.valueOf ( int value)
static

Attempts to find the ObjectGroup with the specified integer value.

Parameters
valueThe integer value of the ObjectGroup.
Returns
The Optional possibly containing the ObjectGroup, if found.

Definition at line 41 of file ObjectGroup.java.

41 {
42 return Arrays.stream(values()).filter(group -> group.value == value).findAny();
43 }

References value.

Member Data Documentation

◆ GROUND_DECORATION

com.runehive.game.world.object.ObjectGroup.GROUND_DECORATION =(3)

The ground decoration object group, which may block a tile.

Definition at line 29 of file ObjectGroup.java.

◆ INTERACTABLE_OBJECT

com.runehive.game.world.object.ObjectGroup.INTERACTABLE_OBJECT =(2)

The interactable object group, for objects that can be clicked and interacted with.

Definition at line 26 of file ObjectGroup.java.

◆ ROOFING

com.runehive.game.world.object.ObjectGroup.ROOFING =(4)

The roof parts that disappear on a camera angle.

Definition at line 32 of file ObjectGroup.java.

◆ value

final int com.runehive.game.world.object.ObjectGroup.value
private

The integer value of the group.

Definition at line 46 of file ObjectGroup.java.

Referenced by getValue(), ObjectGroup(), and valueOf().

◆ WALL

com.runehive.game.world.object.ObjectGroup.WALL =(0)

The wall object group, which may block a tile.

Definition at line 17 of file ObjectGroup.java.

◆ WALL_DECORATION

com.runehive.game.world.object.ObjectGroup.WALL_DECORATION =(1)

The wall decoration object group, which never blocks a tile.

Definition at line 20 of file ObjectGroup.java.


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