Compare commits

..

2 Commits

Author SHA1 Message Date
Syntriax a8acea4151 Merge branch 'development' 2022-12-17 15:28:43 +03:00
Syntriax 723e4a54e0 Collider Mask Field Exposed To Inspector 2022-12-17 15:28:34 +03:00
1 changed files with 3 additions and 1 deletions

View File

@ -6,10 +6,12 @@ namespace Syntriax.Modules.Trigger
{ {
public abstract class ColliderTriggerAreaBase : MonoBehaviour, IColliderTriggerArea public abstract class ColliderTriggerAreaBase : MonoBehaviour, IColliderTriggerArea
{ {
[SerializeField] private LayerMask colliderMask = ~0;
protected Collider2D[] nonAllocResults = new Collider2D[32]; protected Collider2D[] nonAllocResults = new Collider2D[32];
protected int previousTriggerCount = 0; protected int previousTriggerCount = 0;
public LayerMask ColliderMask { get; set; } = ~0; public LayerMask ColliderMask { get => colliderMask; set => colliderMask = value; }
public Action<List<Collider2D>> OnTriggeredCollidersUpdated { get; set; } = null; public Action<List<Collider2D>> OnTriggeredCollidersUpdated { get; set; } = null;
public List<Collider2D> ColliderList { get; protected set; } = new List<Collider2D>(32); public List<Collider2D> ColliderList { get; protected set; } = new List<Collider2D>(32);