Class Base

java.lang.Object
gaiasky.scene.component.Base
All Implemented Interfaces:
com.badlogic.ashley.core.Component, ICopy

public class Base extends Object implements com.badlogic.ashley.core.Component, ICopy
  • Field Details Link icon

    • archetype Link icon

      public Archetype archetype
      Reference to the archetype used to create this entity, if any.
    • id Link icon

      public long id
      The internal identifier
    • names Link icon

      public String[] names
      The name(s) of the node, if any.
    • localizedNameIndex Link icon

      public int localizedNameIndex
      The index of the localized name in the names array.
    • lastStateChangeTimeMs Link icon

      public long lastStateChangeTimeMs
      Time of last visibility change in milliseconds
    • opacity Link icon

      public float opacity
      The ownOpacity value (alpha)
    • ct Link icon

      public ComponentTypes ct
      Component types, for managing visibility
    • computed Link icon

      public boolean computed
      Flag indicating whether the object has been computed in this step.
    • visible Link icon

      public boolean visible
      Is this node visible?
    • copy Link icon

      public boolean copy
      Is this just a copy?
    • initialUpdate Link icon

      public boolean initialUpdate
      Has this been updated at least once?
    • attributes Link icon

      public com.badlogic.gdx.utils.ObjectMap<String,Object> attributes
      Extra attributes.
  • Constructor Details Link icon

    • Base Link icon

      public Base()
  • Method Details Link icon

    • getName Link icon

      public String getName()
    • setName Link icon

      public void setName(String name)
    • setNames Link icon

      public void setNames(String[] names)
    • setName Link icon

      public void setName(String name, int index)
      Sets the given index in the names list to the given name. If the index is out of bounds, nothing happens.
      Parameters:
      name - The new name.
      index - The index in the names list.
    • hasName Link icon

      public boolean hasName(String candidate)
    • hasName Link icon

      public boolean hasName(String candidate, boolean matchCase)
    • addName Link icon

      public int addName(String name)
      Adds a name to the list of names.
      Parameters:
      name - The name.
      Returns:
      The index of the added name.
    • getLocalizedName Link icon

      public String getLocalizedName()
    • updateLocalizedName Link icon

      public void updateLocalizedName()
    • setAltname Link icon

      public void setAltname(String altname)
    • setAltName Link icon

      public void setAltName(String altname)
    • hasCt Link icon

      public boolean hasCt(ComponentTypes.ComponentType ct)
    • setComponentType Link icon

      public void setComponentType(String ct)
    • setCt Link icon

      public void setCt(String ct)
    • setComponentTypes Link icon

      public void setComponentTypes(String[] cts)
    • setComponentType Link icon

      public void setComponentType(String[] cts)
    • setCt Link icon

      public void setCt(String[] cts)
    • setComponentType Link icon

      public void setComponentType(ComponentTypes.ComponentType ct)
    • isVisible Link icon

      public boolean isVisible()
    • msSinceStateChange Link icon

      public long msSinceStateChange()
      Computes the elapsed number of milliseconds since the last visibility state change for the given base component.
      Returns:
      The elapsed time [ms] since the last visibility state change.
    • getVisibilityOpacityFactor Link icon

      public float getVisibilityOpacityFactor()
      Gets the visibility opacity factor for this base component.
      Returns:
      The visibility opacity factor.
    • addExtraAttribute Link icon

      public void addExtraAttribute(String name, Object value)
    • getExtraAttributes Link icon

      public com.badlogic.gdx.utils.ObjectMap<String,Object> getExtraAttributes()
    • hasExtraAttributes Link icon

      public boolean hasExtraAttributes()
    • getCopy Link icon

      public com.badlogic.ashley.core.Component getCopy(com.badlogic.ashley.core.Engine engine)
      Specified by:
      getCopy in interface ICopy