Class ConnectorRelay
java.lang.Object
group24.escaperoom.entities.properties.ItemProperty<PhantomProperty.PhantomPropertyValue>
group24.escaperoom.entities.properties.PhantomProperty
group24.escaperoom.entities.properties.Connector
group24.escaperoom.entities.properties.ConnectorRelay
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable,Connectable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumNested classes/interfaces inherited from class group24.escaperoom.entities.properties.Connector
Connector.ConnectorTypeNested classes/interfaces inherited from class group24.escaperoom.entities.properties.PhantomProperty
PhantomProperty.PhantomPropertyValueNested classes/interfaces inherited from class group24.escaperoom.entities.properties.ItemProperty
ItemProperty.MenuTypeNested classes/interfaces inherited from interface group24.escaperoom.entities.properties.Connectable
Connectable.ConnectableItem, Connectable.Utils -
Field Summary
Fields inherited from class group24.escaperoom.entities.properties.ItemProperty
ownerFields inherited from interface group24.escaperoom.entities.properties.Connectable
defaultConnectionDirections -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptSignalFrom(Connectable source, Types.IntVector2 pos, GameContext ctx, HashSet<Integer> seen) Called when thisConnectablereceives a signal from another.By default, connectable items connect visually to 8 directions.Get aPropertyConfigurationthat contains all fields necessary to configure this property in theItemEditorgetPopOut(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.getType()booleanGet whether or not this Connectable is connected (active)voidpropagate(GameContext ctx, HashSet<Integer> seen) Potentially propagate the the connectors current siganlvoidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData) voidsetActive(boolean connected, GameContext ctx) Set theConnectableto beconnectedThis may or may not propagate the signalvoidupdateInputs(GameContext ctx) voidwrite(com.badlogic.gdx.utils.Json json) Methods inherited from class group24.escaperoom.entities.properties.Connector
getConnectorType, updateColorMethods inherited from class group24.escaperoom.entities.properties.PhantomProperty
getAvailableActions, getPotentialValues, getValueClassMethods inherited from class group24.escaperoom.entities.properties.ItemProperty
apply, cloneProperty, defaultConfiguration, getActions, getCurrentValues, getOwner, set, set, setOwner, unsafeSet, unsafeSet, updateTexture
-
Constructor Details
-
ConnectorRelay
public ConnectorRelay()
-
-
Method Details
-
getDescription
- Overrides:
getDescriptionin classConnector- Returns:
- the
PropertyDescriptionof this Property
-
getInputType
- Overrides:
getInputTypein classPhantomProperty- Returns:
- the
ItemProperty.MenuTypethat should be used to recieve and display theItemPropertyValueassociated with this property - adding a new input type requires updatingItemMenuto support it
-
propagate
Description copied from interface:ConnectablePotentially propagate the the connectors current siganl- Specified by:
propagatein interfaceConnectable- Overrides:
propagatein classConnectorseen- is IDs of allConnectableitems which have already propagated
-
connectionDirections
Description copied from interface:ConnectableBy default, connectable items connect visually to 8 directions. ^ ^ ^ ^ me ^ ^ ^ ^ Override this method to change visual connection directions -
isConnected
public boolean isConnected()Description copied from interface:ConnectableGet whether or not this Connectable is connected (active)- Specified by:
isConnectedin interfaceConnectable- Overrides:
isConnectedin classConnector
-
updateInputs
-
acceptSignalFrom
public void acceptSignalFrom(Connectable source, Types.IntVector2 pos, GameContext ctx, HashSet<Integer> seen) Description copied from interface:ConnectableCalled when thisConnectablereceives a signal from another.- Specified by:
acceptSignalFromin interfaceConnectable- Overrides:
acceptSignalFromin classConnector- Parameters:
source- the Connectable sending the signalpos- the source's positionseen- A set of already visited IDs
-
setActive
Description copied from interface:ConnectableSet theConnectableto beconnectedThis may or may not propagate the signal- Specified by:
setActivein interfaceConnectable- Overrides:
setActivein classConnector
-
getDisplayName
- Overrides:
getDisplayNamein classConnector- Returns:
- name of this property, used as a display string in menus
-
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<PhantomProperty.PhantomPropertyValue>- Parameters:
parent-Menu.MenuEntryspawning this menu- Returns:
- the menu to display
-
getType
- Overrides:
getTypein classConnector- Returns:
PropertyTypeof this property. This allows us to get the property of an item from it's property map- See Also:
-
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) -
getCurrentValue
- Overrides:
getCurrentValuein classItemProperty<PhantomProperty.PhantomPropertyValue>- Returns:
- the current value of this property
-
getCustomItemConfigurationMenu
Description copied from class:ItemPropertyGet aPropertyConfigurationthat contains all fields necessary to configure this property in theItemEditor- Overrides:
getCustomItemConfigurationMenuin classConnector- Returns:
- Some(
PropertyConfiguration) should this property need configuration
-