Record Class ProjectileState
java.lang.Object
java.lang.Record
dev.zwazel.internal.game.state.ProjectileState
- Record Components:
projectileId
- The ID of the projectile.ownerId
- The ID of the client that owns the projectile (client that fired it).transform
- The transform of the projectile.
Represents the state of a projectile.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectileState
(Long projectileId, Long ownerId, Transform transform) Creates an instance of aProjectileState
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.ownerId()
Returns the value of theownerId
record component.Returns the value of theprojectileId
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetransform
record component.
-
Constructor Details
-
ProjectileState
Creates an instance of aProjectileState
record class.- Parameters:
projectileId
- the value for theprojectileId
record componentownerId
- the value for theownerId
record componenttransform
- the value for thetransform
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
projectileId
Returns the value of theprojectileId
record component.- Returns:
- the value of the
projectileId
record component
-
ownerId
-
transform
-