Class location

java.lang.Object
name.moore.kevin.ze.components.location
All Implemented Interfaces:
com.simsilica.es.EntityComponent, iEntityReference

public class location extends Object implements 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
    Modifier and Type
    Field
    Description
    private com.simsilica.es.EntityId
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    location​(com.simsilica.es.EntityId id)
    This constructor uses a reference to another entity as the location of this entity.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.simsilica.es.EntityId
    The identity of the entity we are located on.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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:
      getReference in interface iEntityReference
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns: