Package gaiasky.scene.component
Class Base
java.lang.Object
gaiasky.scene.component.Base
- All Implemented Interfaces:
com.badlogic.ashley.core.Component,ICopy
-
Field Summary
FieldsModifier and TypeFieldDescriptionReference to the archetype used to create this entity, if any.booleanFlag indicating whether the object has been computed in this step.booleanIs this just a copy?Component types, for managing visibilitybooleanForce to render the label of this entity, bypassing the solid angle checklongThe internal identifierbooleanHas this been updated at least once?longTime of last visibility change in millisecondsintThe index of the localized name in thenamesarray.String[]The name(s) of the node, if any.floatThe ownOpacity value (alpha)booleanIs this node visible? -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintAdds a name to the list of names.com.badlogic.ashley.core.ComponentgetCopy(com.badlogic.ashley.core.Engine engine) getName()floatGets the visibility opacity factor for this base component.booleanbooleanbooleanbooleanlongComputes the elapsed number of milliseconds since the last visibility state change for the given base component.voidsetAltname(String altname) voidsetAltName(String altname) voidvoidvoidvoidvoidSets the given index in the names list to the given name.voidvoid
-
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 thenamesarray. -
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)
-