Package tripleplay.entity
Class Component.XY
java.lang.Object
tripleplay.entity.Component
tripleplay.entity.Component.XY
- Enclosing class:
Component
A component implementation for a pair of
float
s.-
Nested Class Summary
Nested classes/interfaces inherited from class tripleplay.entity.Component
Component.FScalar, Component.Generic<T>, Component.IMask, Component.IScalar, Component.XY
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int entityId, float dx, float dy) Addsdx
anddy
to the x and y components forentityId
.pythagoras.f.Dimension
get
(int entityId, pythagoras.f.Dimension into) Writes the x/y components of the point forentityId
intointo
.pythagoras.f.Point
get
(int entityId, pythagoras.f.Point into) Writes the x/y components of the point forentityId
intointo
.pythagoras.f.Vector
get
(int entityId, pythagoras.f.Vector into) Writes the x/y components of the point forentityId
intointo
.float
getX
(int entityId) Returns the x component of the point forentityId
.float
getY
(int entityId) Returns the y component of the point forentityId
.void
set
(int entityId, float x, float y) Updates the x/y components of the point forentityId
.void
set
(int entityId, pythagoras.f.XY value) Updates the x/y components of the point forentityId
.void
set
(int entityId, Component.XY other) Copies the value ofother
forentityId
to this component.void
setX
(int entityId, float x) Updates the x component of the point forentityId
.void
setY
(int entityId, float y) Updates the y component of the point forentityId
.
-
Constructor Details
-
XY
-
-
Method Details
-
getX
public float getX(int entityId) Returns the x component of the point forentityId
. -
getY
public float getY(int entityId) Returns the y component of the point forentityId
. -
get
public pythagoras.f.Point get(int entityId, pythagoras.f.Point into) Writes the x/y components of the point forentityId
intointo
.- Returns:
- into for easy method chaining.
-
get
public pythagoras.f.Vector get(int entityId, pythagoras.f.Vector into) Writes the x/y components of the point forentityId
intointo
.- Returns:
- into for easy method chaining.
-
get
public pythagoras.f.Dimension get(int entityId, pythagoras.f.Dimension into) Writes the x/y components of the point forentityId
intointo
.- Returns:
- into for easy method chaining.
-
setX
public void setX(int entityId, float x) Updates the x component of the point forentityId
. -
setY
public void setY(int entityId, float y) Updates the y component of the point forentityId
. -
set
public void set(int entityId, pythagoras.f.XY value) Updates the x/y components of the point forentityId
. -
set
public void set(int entityId, float x, float y) Updates the x/y components of the point forentityId
. -
set
Copies the value ofother
forentityId
to this component. -
add
public void add(int entityId, float dx, float dy) Addsdx
anddy
to the x and y components forentityId
.
-