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; }
|
Action<ICollider2D, CollisionDetectionInformation>? OnCollisionResolved { get; set; }
|
||||||
|
|
||||||
IRigidBody2D? RigidBody2D { get; }
|
IRigidBody2D? RigidBody2D { get; }
|
||||||
|
bool IsTrigger { get; set; }
|
||||||
|
|
||||||
void Recalculate();
|
void Recalculate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,11 @@ public abstract class Collider2DBehaviourBase : BehaviourOverride, ICollider2D
|
||||||
protected IRigidBody2D? _rigidBody2D = null;
|
protected IRigidBody2D? _rigidBody2D = null;
|
||||||
|
|
||||||
public IRigidBody2D? RigidBody2D => _rigidBody2D;
|
public IRigidBody2D? RigidBody2D => _rigidBody2D;
|
||||||
|
public bool IsTrigger { get; set; } = false;
|
||||||
|
|
||||||
ITransform IAssignableTransform.Transform => Transform;
|
ITransform IAssignableTransform.Transform => Transform;
|
||||||
Action<IAssignableTransform>? IAssignableTransform.OnTransformAssigned { get => GameObject.OnTransformAssigned; set => GameObject.OnTransformAssigned = value; }
|
Action<IAssignableTransform>? IAssignableTransform.OnTransformAssigned { get => GameObject.OnTransformAssigned; set => GameObject.OnTransformAssigned = value; }
|
||||||
|
|
||||||
bool IAssignableTransform.Assign(ITransform transform) => GameObject.Assign(transform);
|
bool IAssignableTransform.Assign(ITransform transform) => GameObject.Assign(transform);
|
||||||
|
|
||||||
public void Recalculate()
|
public void Recalculate()
|
||||||
|
|
Loading…
Reference in New Issue