using UnityEngine; namespace SK.Framework { public static class ColliderExtension { public static T SetIsTrigger(this T self, bool isTrigger) where T : Collider { self.isTrigger = isTrigger; return self; } public static T SetMaterial(this T self, PhysicMaterial physicMaterial) where T : Collider { self.material = physicMaterial; return self; } public static T SetBoxCenter(this T self, Vector3 center) where T : BoxCollider { self.center = center; return self; } public static T SetSize(this T self, Vector3 size) where T : BoxCollider { self.size = size; return self; } public static T SetCapsuleCenter(this T self, Vector3 center) where T : CapsuleCollider { self.center = center; return self; } public static T SetCapsuleRadius(this T self, float radius) where T : CapsuleCollider { self.radius = radius; return self; } public static T SetHeight(this T self, float height) where T : CapsuleCollider { self.height = height; return self; } public static T SetDirection(this T self, int direction) where T : CapsuleCollider { self.direction = direction; return self; } public static T SetSphereCenter(this T self, Vector3 center) where T : SphereCollider { self.center = center; return self; } public static T SetSphereRadius(this T self, float radius) where T : SphereCollider { self.radius = radius; return self; } } }