Class Collideable
java.lang.Object
group24.escaperoom.entities.properties.ItemProperty<PhantomProperty.PhantomPropertyValue>
group24.escaperoom.entities.properties.PhantomProperty
group24.escaperoom.entities.properties.Collideable
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
Collidable items block the player movement. This can be configured to be an area that is not equal to the items actual size.
-
Nested Class Summary
Nested classes/interfaces inherited from class group24.escaperoom.entities.properties.PhantomProperty
PhantomProperty.PhantomPropertyValueNested 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 constructorCollideable(Item item) Convience constructor for when the owner's whole region blocks the playerCollideable(Item item, float dx, float dy, float width, float height) -
Method Summary
Modifier and TypeMethodDescriptioncloneProperty(Item newOwner) Get aPropertyConfigurationthat contains all fields necessary to configure this property in theItemEditorgetType()voidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) voidwrite(com.badlogic.gdx.utils.Json json) Methods inherited from class group24.escaperoom.entities.properties.PhantomProperty
getAvailableActions, getInputType, getPotentialValues, getValueClassMethods inherited from class group24.escaperoom.entities.properties.ItemProperty
apply, defaultConfiguration, getActions, getCurrentValue, getCurrentValues, getOwner, getPopOut, set, set, setOwner, unsafeSet, unsafeSet, updateTexture
-
Constructor Details
-
Collideable
public Collideable()Empty constructor forJson.Serializablecompatability constructor -
Collideable
- Parameters:
item- ownerdx- offset from the bottom left corner where the blocking region beginsdy- offset from the bottom left corner where the blocking region beginswidth- of the blocking regionheight- of the blocking region
-
Collideable
Convience constructor for when the owner's whole region blocks the player- Parameters:
item- owner
-
-
Method Details
-
getDescription
- Specified by:
getDescriptionin classItemProperty<PhantomProperty.PhantomPropertyValue>- Returns:
- the
PropertyDescriptionof this Property
-
getDisplayName
- Specified by:
getDisplayNamein classItemProperty<PhantomProperty.PhantomPropertyValue>- Returns:
- name of this property, used as a display string in menus
-
getType
- Specified by:
getTypein classItemProperty<PhantomProperty.PhantomPropertyValue>- Returns:
PropertyTypeof this property. This allows us to get the property of an item from it's property map- See Also:
-
cloneProperty
- Overrides:
clonePropertyin classItemProperty<PhantomProperty.PhantomPropertyValue>- Parameters:
newOwner- the new owner of this property- Returns:
- a clone of this item property (along with state and values) for a new item
-
write
public void write(com.badlogic.gdx.utils.Json json) - Specified by:
writein interfacecom.badlogic.gdx.utils.Json.Serializable- Overrides:
writein classPhantomProperty
-
read
public void read(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) - Specified by:
readin interfacecom.badlogic.gdx.utils.Json.Serializable- Overrides:
readin classPhantomProperty
-
getCustomItemConfigurationMenu
Description copied from class:ItemPropertyGet aPropertyConfigurationthat contains all fields necessary to configure this property in theItemEditor- Overrides:
getCustomItemConfigurationMenuin classItemProperty<PhantomProperty.PhantomPropertyValue>- Returns:
- Some(
PropertyConfiguration) should this property need configuration
-