Class UnaryConditional
java.lang.Object
group24.escaperoom.entities.properties.conditionals.Conditional
group24.escaperoom.entities.properties.conditionals.UnaryConditional
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable,ItemPropertyValue
- Direct Known Subclasses:
NotConditional,WasNeverTrue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWhether or not to limit the number of children below this conditional By default assumes the condition can have no childrencom.badlogic.gdx.utils.Array<Conditional>Returns an array of this conditional dependents, if they have any.Optional<com.badlogic.gdx.scenes.scene2d.Actor>Primarily used in theConditionalUIbooleanpoll(GameContext ctx) Given the game context, return whether or not this conditional needs to be polled.voidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) booleanvoidsetChildren(Conditional... conds) voidwrite(com.badlogic.gdx.utils.Json json) Methods inherited from class group24.escaperoom.entities.properties.conditionals.Conditional
clone, equals, evaluate, getDisplay, getName, getType
-
Constructor Details
-
UnaryConditional
public UnaryConditional()
-
-
Method Details
-
requiresPoll
public boolean requiresPoll()- Overrides:
requiresPollin classConditional- Returns:
- whether or not this
Conditionalrequires polling
-
poll
Description copied from class:ConditionalGiven the game context, return whether or not this conditional needs to be polled. It must be valid to poll the conditional even after this function returns false- Overrides:
pollin classConditional- Parameters:
ctx- the game context- Returns:
- whether or not this conditional still needs to be polled
-
write
public void write(com.badlogic.gdx.utils.Json json) -
read
public void read(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) -
setChildren
- Overrides:
setChildrenin classConditional- Parameters:
conds- theConditionals to set
-
getChildren
Description copied from class:ConditionalReturns an array of this conditional dependents, if they have any. The array will be the same length asConditional.childCount()- Overrides:
getChildrenin classConditional- Returns:
- an array of conditionals which this conditional depends on
-
childCount
Description copied from class:ConditionalWhether or not to limit the number of children below this conditional By default assumes the condition can have no children- Overrides:
childCountin classConditional- Returns:
- Some(count) if this conditional has a limit to the number of children
-
getEditorConfiguration
public Optional<com.badlogic.gdx.scenes.scene2d.Actor> getEditorConfiguration(LevelEditorScreen editor) Description copied from class:ConditionalPrimarily used in theConditionalUI- Specified by:
getEditorConfigurationin classConditional- Parameters:
editor- theLevelEditorScreenon which this menu will be spawned- Returns:
- Some(CC) should this
Conditionalrequire additional configuration.
-