Class ReadableProperty
java.lang.Object
group24.escaperoom.entities.properties.ItemProperty<ReadableContents>
group24.escaperoom.entities.properties.ReadableProperty
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
-
Nested Class Summary
Nested classes/interfaces inherited from class group24.escaperoom.entities.properties.ItemProperty
ItemProperty.MenuType -
Field Summary
Fields inherited from class group24.escaperoom.entities.properties.ItemProperty
owner -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor forJson.Serializablecompatability constructorReadableProperty(String title) -
Method Summary
Modifier and TypeMethodDescriptioncom.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<ReadableContents>getType()voidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) voidset(ReadableContents 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, getOwner, set, setOwner, unsafeSet, unsafeSet, updateTexture
-
Constructor Details
-
ReadableProperty
public ReadableProperty()Empty constructor forJson.Serializablecompatability constructor -
ReadableProperty
-
-
Method Details
-
getDescription
- Specified by:
getDescriptionin classItemProperty<ReadableContents>- Returns:
- the
PropertyDescriptionof this Property
-
getPotentialValues
- Specified by:
getPotentialValuesin classItemProperty<ReadableContents>- Returns:
- all possible values for this property
-
getDisplayName
- Specified by:
getDisplayNamein classItemProperty<ReadableContents>- Returns:
- name of this property, used as a display string in menus
-
getType
- Specified by:
getTypein classItemProperty<ReadableContents>- Returns:
PropertyTypeof this property. This allows us to get the property of an item from it's property map- See Also:
-
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<ReadableContents>- Parameters:
value- to set
-
getInputType
- Specified by:
getInputTypein classItemProperty<ReadableContents>- 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<ReadableContents>- Parameters:
parent-Menu.MenuEntryspawning this menu- Returns:
- the menu to display
-
getCurrentValue
- Overrides:
getCurrentValuein classItemProperty<ReadableContents>- Returns:
- the current value of this property
-
getAvailableActions
- Specified by:
getAvailableActionsin classItemProperty<ReadableContents>- Returns:
- all available
PlayerAction
-
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<ReadableContents>- Returns:
- the class of the
ItemPropertyValuefor this property
-