Class CollisionEventFilterExtensions
- Namespace
- LunyScript.Api /
- Assembly
- LunyScript.dll
public static class CollisionEventFilterExtensions
Expand Details ...
- Inheritance
-
ObjectCollisionEventFilterExtensions
Methods
Cooldown<T>(CollisionEventBuilder<T>, Double)
Minimum seconds between successive reactions. Zero (default) means no cooldown. The cooldown is checked before collision predicates; evaluated per event sequence.
public static CollisionEventBuilder<CollisionReady> Cooldown<T>(this CollisionEventBuilder<T> b, Double seconds) where T : struct, ICollisionFilterable
Parameters
| Type | Name | Description |
|---|---|---|
b |
||
seconds |
Returns
Type Parameters
T
Layered<T>(CollisionEventBuilder<T>, params String[])
Only react when the other object is on one of the given layers (OR logic). Mutually exclusive with Masked() — Masked() becomes unavailable after calling this.
public static CollisionEventBuilder<CollisionLayered> Layered<T>(this CollisionEventBuilder<T> b, params String[] layerNames) where T : struct, ICollisionFilterable
Parameters
| Type | Name | Description |
|---|---|---|
b |
||
layerNames |
Returns
Type Parameters
T
Masked<T>(CollisionEventBuilder<T>, Int32)
Only react when the other object's layer is included in the given bitmask. Mutually exclusive with Layered() — unavailable after Layered() is called.
public static CollisionEventBuilder<CollisionMasked> Masked<T>(this CollisionEventBuilder<T> b, Int32 layerMask) where T : struct, ICollisionFilterable
Parameters
| Type | Name | Description |
|---|---|---|
b |
||
layerMask |
Returns
Type Parameters
T
Masked<T>(CollisionEventBuilder<T>, params String[])
Only react when the other object's layer name matches one of the given names (OR logic). Mutually exclusive with Layered() — unavailable after Layered() is called.
public static CollisionEventBuilder<CollisionMasked> Masked<T>(this CollisionEventBuilder<T> b, params String[] layerNames) where T : struct, ICollisionFilterable
Parameters
| Type | Name | Description |
|---|---|---|
b |
||
layerNames |
Returns
Type Parameters
T
Tagged<T>(CollisionEventBuilder<T>, params String[])
Only react when the other object has one of the given tags (OR logic). Combine with other filter kinds for AND logic across kinds.
public static CollisionEventBuilder<CollisionReady> Tagged<T>(this CollisionEventBuilder<T> b, params String[] tags) where T : struct, ICollisionFilterable
Parameters
| Type | Name | Description |
|---|---|---|
b |
||
tags |
Returns
Type Parameters
T
Typed<T>(CollisionEventBuilder<T>, params Type[])
Only react when the other object's component list contains at least one of the given types (OR logic).
public static CollisionEventBuilder<CollisionReady> Typed<T>(this CollisionEventBuilder<T> b, params Type[] componentTypes) where T : struct, ICollisionFilterable
Parameters
| Type | Name | Description |
|---|---|---|
b |
||
componentTypes |
Returns
Type Parameters
T
With<T>(CollisionEventBuilder<T>, params String[])
Only react when the other object's name matches one of the given names (OR logic).
public static CollisionEventBuilder<CollisionReady> With<T>(this CollisionEventBuilder<T> b, params String[] names) where T : struct, ICollisionFilterable
Parameters
| Type | Name | Description |
|---|---|---|
b |
||
names |
Returns
Type Parameters
T