Package gaiasky.scene.component
Class Base
java.lang.Object
gaiasky.scene.component.Base
- All Implemented Interfaces:
com.badlogic.ashley.core.Component
,ICopy
-
Field Summary
Modifier and TypeFieldDescriptionReference to the archetype used to create this entity, if any.boolean
Flag indicating whether the object has been computed in this step.boolean
Is this just a copy?Component types, for managing visibilityboolean
Force to render the label of this entity, bypassing the solid angle checklong
The internal identifierboolean
Has this been updated at least once?long
Time of last visibility change in millisecondsint
The index of the localized name in thenames
array.String[]
The name(s) of the node, if any.float
The ownOpacity value (alpha)boolean
Is this node visible? -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Adds a name to the list of names.com.badlogic.ashley.core.Component
getCopy
(com.badlogic.ashley.core.Engine engine) getName()
float
Gets the visibility opacity factor for this base component.boolean
boolean
boolean
boolean
long
Computes the elapsed number of milliseconds since the last visibility state change for the given base component.void
setAltname
(String altname) void
setAltName
(String altname) void
void
void
void
void
Sets the given index in the names list to the given name.void
void
-
Field Details
-
archetype
Reference to the archetype used to create this entity, if any. -
id
public long idThe internal identifier -
names
The name(s) of the node, if any. -
localizedNameIndex
public int localizedNameIndexThe index of the localized name in thenames
array. -
lastStateChangeTimeMs
public long lastStateChangeTimeMsTime of last visibility change in milliseconds -
opacity
public float opacityThe ownOpacity value (alpha) -
ct
Component types, for managing visibility -
computed
public boolean computedFlag indicating whether the object has been computed in this step. -
visible
public boolean visibleIs this node visible? -
forceLabel
public boolean forceLabelForce to render the label of this entity, bypassing the solid angle check -
copy
public boolean copyIs this just a copy? -
initialUpdate
public boolean initialUpdateHas this been updated at least once?
-
-
Constructor Details
-
Base
public Base()
-
-
Method Details
-
getName
-
setName
-
setNames
-
setName
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
-
hasName
-
addName
Adds a name to the list of names.- Parameters:
name
- The name.- Returns:
- The index of the added name.
-
getLocalizedName
-
updateLocalizedName
public void updateLocalizedName() -
setAltname
-
setAltName
-
hasCt
-
setCt
-
setCt
-
setComponentType
-
isVisible
public boolean isVisible() -
msSinceStateChange
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
public float getVisibilityOpacityFactor()Gets the visibility opacity factor for this base component.- Returns:
- The visibility opacity factor.
-
getCopy
public com.badlogic.ashley.core.Component getCopy(com.badlogic.ashley.core.Engine engine)
-