Package net.risingworld.api.objects
Class Corpse
java.lang.Object
net.risingworld.api.objects.Corpse
Representing a dead body.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyPhysicalImpulse(Vector3f impulse) Applies a physical impulse to the corpse (applied to the center).voidapplyPhysicalImpulse(Vector3f offset, Vector3f impulse) Applies a physical impulse to the corpse (applied to the position defined by the local offset).voiddestroy(boolean fade) booleanisValid()voidsetPosition(float x, float y, float z) Sets the position of the corpse.voidsetPosition(Vector3f position) Sets the position of the corpse.voidsetPositionAndRotation(Vector3f position, Quaternion rotation) voidsetRotation(Quaternion rotation) Sets the rotation of the corpse.
-
Constructor Details
-
Corpse
protected Corpse(long handle)
-
-
Method Details
-
isValid
public boolean isValid() -
destroy
public void destroy(boolean fade) -
getCorpseType
-
getPosition
-
setPosition
Sets the position of the corpse.- Parameters:
position- the new position.
-
setPosition
public void setPosition(float x, float y, float z) Sets the position of the corpse.- Parameters:
x- x coordinate (horizontally).y- y coordinate (vertically).z- z coordinate (horizontally).
-
getRotation
-
setRotation
Sets the rotation of the corpse.- Parameters:
rotation- the new rotation.
-
setPositionAndRotation
-
applyPhysicalImpulse
Applies a physical impulse to the corpse (applied to the center).- Parameters:
impulse- the impulse you want to apply to the corpse.
-
applyPhysicalImpulse
Applies a physical impulse to the corpse (applied to the position defined by the local offset).- Parameters:
offset- the local offset (relative to the corpse center) where the impulse should be applied.impulse- the impulse you want to apply to the corpse.
-