Package name.moore.kevin.ze.components
Class inorbit
java.lang.Object
name.moore.kevin.ze.components.inorbit
- All Implemented Interfaces:
com.simsilica.es.EntityComponent,iEntityReference
This component is used for entities that don't have their own coordinates but
are in orbit of another entity eg a planet around a sun.
The coordinates of such an entity are the coordinates of the thing it is orbiting. For example a ship in orbit has the coordinates of the planet below.
- Author:
- Kevin Moore
<dev@kevin.moore.name>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.simsilica.es.EntityIdThe EntityId of the entity referred to.toString()
-
Field Details
-
distance
-
reference
private com.simsilica.es.EntityId referencethe actual entity in orbit of.
-
-
Constructor Details
-
inorbit
- Parameters:
reference-distance-
-
inorbit
public inorbit(com.simsilica.es.EntityId reference)
-
-
Method Details
-
getDistance
- Returns:
-
getReference
public com.simsilica.es.EntityId getReference()Description copied from interface:iEntityReferenceThe EntityId of the entity referred to.This may be
EntityId.NULL_IDif the entity has not yet been located.- Specified by:
getReferencein interfaceiEntityReference- Returns:
-
toString
-