Impact Interaction System API
|
Static class that handles the reference for the currently active Impact Manager instance. More...
Static Public Member Functions | |
static void | SetInstance (ImpactManager inst) |
Sets the ImpactManager instance that all static methods will use. More... | |
static ImpactManager | GetInstance (bool createIfNull=true) |
Gets the current ImpactManager instance. More... | |
static void | ClearInstance (ImpactManager inst) |
Clears the current ImpactManager instance, if it is the same as the provided instance. More... | |
static bool | HasReachedPhysicsInteractionsLimit () |
Checks if the current physics interaction count has been reached. More... | |
static void | IncrementPhysicsInteractionsLimit () |
Increments the physics interaction count. | |
static bool | HasReachedContinuousInteractionLimit () |
Has the maximum number of active continuous interactions been reached? More... | |
static bool | HasActiveContinuousInteractionWithKey (long key) |
static bool | TryGetImpactMaterialFromMapping (Collider collider, out IImpactMaterial impactMaterial) |
Try to get an Impact Material from the Material Mapping using the given Collider. More... | |
static bool | TryGetImpactMaterialFromMapping (Collider2D collider2d, out IImpactMaterial impactMaterial) |
Try to get an Impact Material from the Material Mapping using the given Collider2D. More... | |
static bool | TryGetImpactMaterialFromMapping (int physicsMaterialInstanceId, out IImpactMaterial impactMaterial) |
Try to get an Impact Material from the Material Mapping using the given Physics Material instance ID. More... | |
static void | ProcessInteraction< T > (T interactionData, IImpactObject impactObject) |
Process interaction data using the given Impact Object. The primary material at the interaction point will be used. More... | |
static void | ProcessInteraction< T > (T interactionData, IImpactMaterial impactMaterial, IImpactObject impactObject) |
Process interaction data using the Impact Material and an optional Impact Object that the interaction originated from. More... | |
static void | ProcessContinuousInteraction< T > (T interactionData, IImpactObject impactObject) |
Process a continuous interaction using the interaction data and the given Impact Object. The primary material at the interaction point will be used. More... | |
static void | ProcessContinuousInteraction< T > (T interactionData, IImpactMaterial material, IImpactObject impactObject) |
Process a continuous interaction using the interaction data, an Impact Material, and an optional Impact Object that the interaction originated from. More... | |
static void | AddOrUpdateContinuousInteractionResult (IImpactObject impactObject, IContinuousInteractionResult result) |
Adds or updates the given continuous interaction result to the active continuous interaction results, if able. More... | |
static void | CreateInteractionResultPool< T > (string key) |
Creates a new Interaction Result pool with the given key and size. More... | |
static bool | TryGetInteractionResultFromPool< T > (string key, out T obj) |
Attempts to get an available empty interaction result from the pool with the specified key. More... | |
Properties | |
static IInteractionResult[] | InteractionResultBuffer [get] |
Shared buffer for retrieving interaction results from Impact Materials. | |
static ImpactMaterialComposition[] | MaterialCompositionBuffer [get] |
Shared buffer for retrieving material composition. | |
static bool | UseMaterialMapping [get, set] |
Is the material mapping feature enabled in the configuration? | |
Static class that handles the reference for the currently active Impact Manager instance.
|
static |
Adds or updates the given continuous interaction result to the active continuous interaction results, if able.
impactObject | The impact object the result is being sent from. |
result | The new continuous interaction result. |
|
static |
Clears the current ImpactManager instance, if it is the same as the provided instance.
inst | The instance to clear. |
|
static |
Creates a new Interaction Result pool with the given key and size.
T | The IPoolable type to use. |
key | The name of the pool, used to retrieve objects. |
T | : | class | |
T | : | IPoolable | |
T | : | new() |
|
static |
Gets the current ImpactManager instance.
createIfNull | Should an instance be created if one does not exist? |
|
static |
Has the maximum number of active continuous interactions been reached?
|
static |
Checks if the current physics interaction count has been reached.
|
static |
Process a continuous interaction using the interaction data, an Impact Material, and an optional Impact Object that the interaction originated from.
interactionData | The interaction data to process. |
impactMaterial | The Impact Material to get interaction results from. |
impactObject | An optional Impact Object that the interaction originated from. |
T | : | IInteractionData |
|
static |
Process a continuous interaction using the interaction data and the given Impact Object. The primary material at the interaction point will be used.
interactionData | The interaction data to process. |
impactObject | The Impact Object that an Impact Material will be retrieved from. |
T | : | IInteractionData |
|
static |
Process interaction data using the Impact Material and an optional Impact Object that the interaction originated from.
interactionData | The interaction data to process. |
impactMaterial | The Impact Material to get interaction results from. |
impactObject | An optional Impact Object that the interaction originated from. |
T | : | IInteractionData |
|
static |
|
static |
Sets the ImpactManager instance that all static methods will use.
inst | The new instance. |
|
static |
Try to get an Impact Material from the Material Mapping using the given Collider.
collider | The collider that has the Physic Material to get a mapping for. |
impactMaterial | The material that was found in the mapping, if one was found. Null otherwise. |
|
static |
Try to get an Impact Material from the Material Mapping using the given Collider2D.
collider2d | The collider that has the Physics Material 2D to get a mapping for. |
impactMaterial | The material that was found in the mapping, if one was found. Null otherwise. |
|
static |
Try to get an Impact Material from the Material Mapping using the given Physics Material instance ID.
physicsMaterialInstanceId | The instance ID of the physics material (3D or 2D). |
impactMaterial | The material that was found in the mapping, if one was found. Null otherwise. |
|
static |
Attempts to get an available empty interaction result from the pool with the specified key.
T | The IPoolable type to get. |
key | The name of the pool. |
obj | The returned result, if one was found. |
T | : | class | |
T | : | IPoolable | |
T | : | new() |