Package dev.twilite.game.wrapper
Class Projectile
java.lang.Object
dev.twilite.game.wrapper.Projectile
Projectile moving through the world.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectile(dev.twilite.game.internal.memory.RSProjectile memory, World world) Wraps a native projectile provider. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.intduration()Returns the total projectile duration in game ticks.intelapsed()Returns the elapsed projectile duration in game ticks.fine()Returns this unit's fine coordinate, representing its model location.intid()Returns the projectile id.map()Returns this unit's map coordinate relative to the loaded world area.Returns the projectile origin coordinate from its origin fields.intReturns the remaining projectile duration in game ticks.source()Resolves the actor that launched the projectile.target()Resolves the actor targeted by the projectile.Returns the projectile target coordinate from its target fields.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.Unit
area, directPathTo, directPathTo, directPathTo, distanceTo, distanceTo, distanceTo, lineOfSightTo, lineOfSightTo, lineOfSightTo, lineOfWalkTo, lineOfWalkTo, lineOfWalkTo, manhattanDistanceTo, manhattanDistanceTo, manhattanDistanceTo, pathInDirection
-
Constructor Details
-
Projectile
Wraps a native projectile provider.
-
-
Method Details
-
id
public int id()Returns the projectile 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
-
source
Resolves the actor that launched the projectile. -
target
Resolves the actor targeted by the projectile. -
duration
public int duration()Returns the total projectile duration in game ticks. -
elapsed
public int elapsed()Returns the elapsed projectile duration in game ticks. -
remaining
public int remaining()Returns the remaining projectile duration in game ticks. -
originCoord
Returns the projectile origin coordinate from its origin fields. -
targetCoord
Returns the projectile target coordinate from its target fields. -
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.
-