Package net.runelite.api
Interface RuneLiteObject
-
- All Superinterfaces:
GraphicsObject
,Node
,Renderable
public interface RuneLiteObject extends GraphicsObject
Represents a modifiedGraphicsObject
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
drawFrontTilesFirst()
If true, the rectangle computed from the radius has 1 or 2 of its sides expanded by a full tile based on the orientation the object is facing.int
getOrientation()
Get the object orientationint
getRadius()
Get the object radius.boolean
isActive()
Gets the state of the RuneLiteObjectvoid
setActive(boolean active)
Sets the state of the RuneLiteObject Set to true to spawn the object Set to false to despawn the objectvoid
setAnimation(Animation animation)
Sets the animation of the RuneLiteObject If animation is null model will be staticvoid
setDrawFrontTilesFirst(boolean drawFrontTilesFirst)
Sets whether the front tiles are drawn first.void
setLocation(LocalPoint point, int plane)
Sets the location in the scene for the RuneLiteObjectvoid
setModel(Model model)
Sets the model of the RuneLiteObjectvoid
setOrientation(int orientation)
Set the object orientationvoid
setRadius(int radius)
Set the object radiusvoid
setShouldLoop(boolean shouldLoop)
Sets whether the animation of the RuneLiteObject should loop when the animation ends.-
Methods inherited from interface net.runelite.api.GraphicsObject
finished, getAnimation, getAnimationFrame, getId, getLevel, getLocation, getStartCycle, getZ, setFinished
-
Methods inherited from interface net.runelite.api.Node
getHash, getNext, getPrevious
-
Methods inherited from interface net.runelite.api.Renderable
draw, getModel, getModelHeight, setModelHeight
-
-
-
-
Method Detail
-
setModel
void setModel(Model model)
Sets the model of the RuneLiteObject
-
setAnimation
void setAnimation(Animation animation)
Sets the animation of the RuneLiteObject If animation is null model will be static
-
setShouldLoop
void setShouldLoop(boolean shouldLoop)
Sets whether the animation of the RuneLiteObject should loop when the animation ends. If this is false the object will despawn when the animation ends. Does nothing if the animation is null.
-
setLocation
void setLocation(LocalPoint point, int plane)
Sets the location in the scene for the RuneLiteObject
-
setActive
void setActive(boolean active)
Sets the state of the RuneLiteObject Set to true to spawn the object Set to false to despawn the object
-
isActive
boolean isActive()
Gets the state of the RuneLiteObject- Returns:
- true if the RuneLiteObject is added to the scene
-
getOrientation
int getOrientation()
Get the object orientation- Returns:
- See Also:
Angle
-
setOrientation
void setOrientation(int orientation)
Set the object orientation- Parameters:
orientation
-- See Also:
Angle
-
getRadius
int getRadius()
Get the object radius. The radius is offset from the object position to form a 2d rectangle, and the tiles the corners are in are used to determine the min and max scene x/y the object is on. These tiles are then drawn first prior to the object being drawn, so that the object renders correctly over top of each tile. The default radius is 60, marginally less than 128/2, which works well for models the size of a single tile.- Returns:
-
setRadius
void setRadius(int radius)
Set the object radius- Parameters:
radius
-- See Also:
getRadius()
-
drawFrontTilesFirst
boolean drawFrontTilesFirst()
If true, the rectangle computed from the radius has 1 or 2 of its sides expanded by a full tile based on the orientation the object is facing. This causes the tiles the object is facing to be drawn first, even if the radius of the object would not place the object on that tile. The default is false.- Returns:
-
setDrawFrontTilesFirst
void setDrawFrontTilesFirst(boolean drawFrontTilesFirst)
Sets whether the front tiles are drawn first.- Parameters:
drawFrontTilesFirst
-- See Also:
drawFrontTilesFirst()
-
-