Package com.csse3200.game.components
Class ConfigComponent<T>
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.ConfigComponent<T>
- Type Parameters:
T
- The type of the configuration object.
A component that holds and manages configuration data for an entity.
This component can store a configuration object of a specific type directly.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConfigComponent
(T config) Constructs a new ConfigComponent with the specified configuration object. -
Method Summary
Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ConfigComponent
Constructs a new ConfigComponent with the specified configuration object.- Parameters:
config
- The configuration object associated with this component.
-
-
Method Details
-
getConfig
Retrieves the configuration object associated with this component.- Returns:
- The configuration object.
-