Package dev.twilite.game.wrapper
Class SceneObject
java.lang.Object
dev.twilite.game.wrapper.SceneObject
- All Implemented Interfaces:
Id,Interactable,InteractableUnit,Unit
Scene object wrapper for walls, decorations, and ground objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionapproach()Returns coords from which this object can be interacted with.area()Returns the area this unit occupies.intbaseId()Returns the raw object definition id before transforms.intconfig()Returns the raw scene object config.Returns the generated gameval constant name forId.id(), or the numeric id as text when no constant is known.coord()Returns this unit's world coordinate.fine()Returns this unit's fine coordinate, representing its model location.intid()Returns the transformed object definition id.integerParameter(int id) Returns an integer cache parameter from the current object definition.intlayer()Returns the scene object layer.map()Returns this unit's map coordinate relative to the loaded world area.name()Returns the standardized transformed object name when the cache definition is available.objectParameter(int id) Returns a raw cache parameter from the current object definition.options()Returns object menu options from the current definition.booleanselect()Enqueues the selected-use-on-object action.intshape()Returns the object shape.booleantarget()Enqueues the selected-target-on-object action.world()Returns the world this unit belongs to.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.twilite.game.trait.Interactable
interact, optionMethods inherited from interface dev.twilite.game.trait.Unit
directPathTo, directPathTo, directPathTo, distanceTo, distanceTo, distanceTo, lineOfSightTo, lineOfSightTo, lineOfSightTo, lineOfWalkTo, lineOfWalkTo, lineOfWalkTo, manhattanDistanceTo, manhattanDistanceTo, manhattanDistanceTo, pathInDirection
-
Field Details
-
WALL
public static final int WALL- See Also:
-
WALL_DECOR
public static final int WALL_DECOR- See Also:
-
GROUND_DECOR
public static final int GROUND_DECOR- See Also:
-
GROUND_OBJECT
public static final int GROUND_OBJECT- See Also:
-
ALL
public static final int ALL- See Also:
-
-
Method Details
-
world
Description copied from interface:UnitReturns the world this unit belongs to. -
coord
Description copied from interface:UnitReturns this unit's world coordinate. -
fine
Description copied from interface:UnitReturns this unit's fine coordinate, representing its model location. -
map
Description copied from interface:UnitReturns this unit's map coordinate relative to the loaded world area. -
area
Description copied from interface:UnitReturns the area this unit occupies. -
layer
public int layer()Returns the scene object layer. -
baseId
public int baseId()Returns the raw object definition id before transforms. -
id
public int id()Returns the transformed object definition id. -
constantName
Description copied from interface:IdReturns the generated gameval constant name forId.id(), or the numeric id as text when no constant is known.This is intended for logs and diagnostics where a stable symbolic name is easier to read than a raw number.
- Specified by:
constantNamein interfaceId
-
name
Returns the standardized transformed object name when the cache definition is available. Standardized text is tag-stripped, trimmed, and lowercased. -
integerParameter
Returns an integer cache parameter from the current object definition. -
objectParameter
Returns a raw cache parameter from the current object definition. -
shape
public int shape()Returns the object shape. -
config
public int config()Returns the raw scene object config. -
approach
Returns coords from which this object can be interacted with. This does not account for path reachability. -
options
Returns object menu options from the current definition.- Specified by:
optionsin interfaceInteractable
-
target
public boolean target()Enqueues the selected-target-on-object action.- Specified by:
targetin interfaceInteractable
-
select
public boolean select()Enqueues the selected-use-on-object action.- Specified by:
selectin interfaceInteractable
-