Class BooleanProperty
java.lang.Object
group24.escaperoom.entities.properties.ItemProperty<BooleanProperty.BooleanValue>
group24.escaperoom.entities.properties.BooleanProperty
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
- Direct Known Subclasses:
FragileProperty
A base class for properties which are true or false
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA wrapper around a boolean that is also aItemPropertyValueNested classes/interfaces inherited from class group24.escaperoom.entities.properties.ItemProperty
ItemProperty.MenuType -
Field Summary
FieldsFields inherited from class group24.escaperoom.entities.properties.ItemProperty
owner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.badlogic.gdx.utils.Array<PlayerAction>com.badlogic.gdx.utils.Array<BooleanProperty.BooleanValue>booleanisTrue()voidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) voidset(BooleanProperty.BooleanValue value) Set the value of this property to value It is the responsibility of the caller to only pass values that are recieved fromItemProperty.getPotentialValues()voidwrite(com.badlogic.gdx.utils.Json json) Methods inherited from class group24.escaperoom.entities.properties.ItemProperty
apply, cloneProperty, defaultConfiguration, getActions, getCurrentValues, getCustomItemConfigurationMenu, getDescription, getDisplayName, getOwner, getPopOut, getType, set, setOwner, unsafeSet, unsafeSet, updateTexture
-
Field Details
-
currentValue
public boolean currentValueThe current value of this property
-
-
Constructor Details
-
BooleanProperty
public BooleanProperty()
-
-
Method Details
-
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) -
getValueClass
- Specified by:
getValueClassin classItemProperty<BooleanProperty.BooleanValue>- Returns:
- the class of the
ItemPropertyValuefor this property
-
getPotentialValues
- Specified by:
getPotentialValuesin classItemProperty<BooleanProperty.BooleanValue>- Returns:
- all possible values for this property
-
set
Description copied from class:ItemPropertySet the value of this property to value It is the responsibility of the caller to only pass values that are recieved fromItemProperty.getPotentialValues()- Overrides:
setin classItemProperty<BooleanProperty.BooleanValue>- Parameters:
value- to set
-
getInputType
- Specified by:
getInputTypein classItemProperty<BooleanProperty.BooleanValue>- Returns:
- the
ItemProperty.MenuTypethat should be used to recieve and display theItemPropertyValueassociated with this property - adding a new input type requires updatingItemMenuto support it
-
getCurrentValue
- Overrides:
getCurrentValuein classItemProperty<BooleanProperty.BooleanValue>- Returns:
- the current value of this property
-
getAvailableActions
- Specified by:
getAvailableActionsin classItemProperty<BooleanProperty.BooleanValue>- Returns:
- all available
PlayerAction
-
isTrue
public boolean isTrue()
-