Class ConnectorSource
java.lang.Object
group24.escaperoom.entities.properties.ItemProperty<PhantomProperty.PhantomPropertyValue>
group24.escaperoom.entities.properties.PhantomProperty
group24.escaperoom.entities.properties.Connector
group24.escaperoom.entities.properties.ConnectorSource
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable,Connectable
-
Nested Class Summary
Nested 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 position, GameContext ctx, HashSet<Integer> seen) Called when thisConnectablereceives a signal from another.Get the type of connector.Get aPropertyConfigurationthat contains all fields necessary to configure this property in theItemEditorgetType()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 signalvoidwrite(com.badlogic.gdx.utils.Json json) Methods inherited from class group24.escaperoom.entities.properties.Connector
isConnected, updateColorMethods inherited from class group24.escaperoom.entities.properties.PhantomProperty
getAvailableActions, getInputType, getPotentialValues, getValueClassMethods inherited from class group24.escaperoom.entities.properties.ItemProperty
apply, cloneProperty, defaultConfiguration, getActions, getCurrentValue, getCurrentValues, getOwner, getPopOut, set, set, setOwner, unsafeSet, unsafeSet, updateTextureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface group24.escaperoom.entities.properties.Connectable
connectionDirections
-
Constructor Details
-
ConnectorSource
public ConnectorSource()
-
-
Method Details
-
getDescription
- Overrides:
getDescriptionin classConnector- Returns:
- the
PropertyDescriptionof this Property
-
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:
-
getDisplayName
- Overrides:
getDisplayNamein classConnector- Returns:
- name of this property, used as a display string in menus
-
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
-
setActive
Description copied from interface:ConnectableSet theConnectableto beconnectedThis may or may not propagate the signal- Specified by:
setActivein interfaceConnectable- Overrides:
setActivein classConnector
-
getConnectorType
Description copied from interface:ConnectableGet the type of connector.- Specified by:
getConnectorTypein interfaceConnectable- Overrides:
getConnectorTypein classConnector
-
acceptSignalFrom
public void acceptSignalFrom(Connectable source, Types.IntVector2 position, 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 signalposition- the source's positionseen- A set of already visited IDs
-
write
public void write(com.badlogic.gdx.utils.Json json) -
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
-
read
public void read(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData)
-