ResetComponentAction - acrimi/Raven GitHub Wiki

Extends ComponentAction

ResetComponentAction is an implementation of ComponentAction that resets one or more components attached to an entity to their default configuration for that entity type. If any of the components are not currently attached to the entity, the action will have no effect for that component.

Configuration

The following parameters can be used to configure the action's behavior:

Key Type Description
allowDetached boolean Optional flag to indicate if the component should be reset even if it is not currently attached to the entity. Defaults to false.
components* string[] Array of all components to be processed by the action. Must be the full name of the component class.
component* string The full name of single component class to be processed by the action. Ignored if components is defined.

* from ComponentAction

Examples:

"eventName": {
  "action": "ResetComponentAction",
  "components": [
    "HitBoxComponent",
    "CollisionComponent"
  ]
}
"eventName": {
  "action": "ResetComponentAction",
  "component": "PhysicsComponent",
  "allowDetached": true
}
⚠️ **GitHub.com Fallback** ⚠️