feat: ICollider IsTrigger
This commit is contained in:
parent
0d4c96a2fc
commit
574104c224
|
@ -10,6 +10,7 @@ public interface ICollider2D : IBehaviour, IAssignableTransform
|
|||
Action<ICollider2D, CollisionDetectionInformation>? OnCollisionResolved { get; set; }
|
||||
|
||||
IRigidBody2D? RigidBody2D { get; }
|
||||
bool IsTrigger { get; set; }
|
||||
|
||||
void Recalculate();
|
||||
}
|
||||
|
|
|
@ -16,9 +16,11 @@ public abstract class Collider2DBehaviourBase : BehaviourOverride, ICollider2D
|
|||
protected IRigidBody2D? _rigidBody2D = null;
|
||||
|
||||
public IRigidBody2D? RigidBody2D => _rigidBody2D;
|
||||
public bool IsTrigger { get; set; } = false;
|
||||
|
||||
ITransform IAssignableTransform.Transform => Transform;
|
||||
Action<IAssignableTransform>? IAssignableTransform.OnTransformAssigned { get => GameObject.OnTransformAssigned; set => GameObject.OnTransformAssigned = value; }
|
||||
|
||||
bool IAssignableTransform.Assign(ITransform transform) => GameObject.Assign(transform);
|
||||
|
||||
public void Recalculate()
|
||||
|
|
Loading…
Reference in New Issue