Class ConditionalProperty
java.lang.Object
group24.escaperoom.entities.properties.ItemProperty<Conditional>
group24.escaperoom.entities.properties.conditionals.ConditionalProperty
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
- Direct Known Subclasses:
ConditionallyActive,ConditionallyVisible
-
Nested Class Summary
Nested 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>getPopOut(Menu.MenuEntry parent) If this property specifiesItemProperty.MenuType.PopOutThis function will be called to get the Menu which should be displayed when this property is selected.com.badlogic.gdx.utils.Array<Conditional>booleanisValid(GameContext ctx) booleanpoll(GameContext ctx) Return whether or not this property still needs to be polledvoidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) booleanvoidset(Conditional 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()voidupdate(GameContext ctx) 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, getType, set, setOwner, unsafeSet, unsafeSet, updateTexture
-
Field Details
-
condition
-
-
Constructor Details
-
ConditionalProperty
public ConditionalProperty()
-
-
Method Details
-
requiresPoll
public boolean requiresPoll() -
poll
Return whether or not this property 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) -
getPotentialValues
- Specified by:
getPotentialValuesin classItemProperty<Conditional>- Returns:
- all possible values for this property
-
isValid
-
update
-
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<Conditional>- Parameters:
value- to set
-
getCurrentValue
- Overrides:
getCurrentValuein classItemProperty<Conditional>- Returns:
- the current value of this property
-
getAvailableActions
- Specified by:
getAvailableActionsin classItemProperty<Conditional>- Returns:
- all available
PlayerAction
-
getInputType
- Specified by:
getInputTypein classItemProperty<Conditional>- Returns:
- the
ItemProperty.MenuTypethat should be used to recieve and display theItemPropertyValueassociated with this property - adding a new input type requires updatingItemMenuto support it
-
getPopOut
Description copied from class:ItemPropertyIf this property specifiesItemProperty.MenuType.PopOutThis function will be called to get the Menu which should be displayed when this property is selected.- Overrides:
getPopOutin classItemProperty<Conditional>- Parameters:
parent-Menu.MenuEntryspawning this menu- Returns:
- the menu to display
-
getValueClass
- Specified by:
getValueClassin classItemProperty<Conditional>- Returns:
- the class of the
ItemPropertyValuefor this property
-