Package name.moore.kevin.ze.components
Class location
java.lang.Object
name.moore.kevin.ze.components.location
- All Implemented Interfaces:
com.simsilica.es.EntityComponent,iEntityReference
The location component is attached to entities that have a fixed position
relative to another entity eg an industry on a planet.
For instance if an industry is located on a planet, the reference is to the EntityId of that planet.
- Author:
- Kevin Moore
<dev@kevin.moore.name>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionlocation(com.simsilica.es.EntityId id)This constructor uses a reference to another entity as the location of this entity. -
Method Summary
Modifier and TypeMethodDescriptioncom.simsilica.es.EntityIdThe identity of the entity we are located on.toString()
-
Field Details
-
reference
private com.simsilica.es.EntityId reference
-
-
Constructor Details
-
location
public location(com.simsilica.es.EntityId id)This constructor uses a reference to another entity as the location of this entity.- Parameters:
id-
-
-
Method Details
-
getReference
public com.simsilica.es.EntityId getReference()The identity of the entity we are located on.- Specified by:
getReferencein interfaceiEntityReference- Returns:
-
toString
-