привет, помоги с рефакторингом кода для unity 
public class WheelCollision : MonoBehaviour
{
    private const string Cone = "Cone";
    private const string RoadMarkings = "RoadMarkings";
    private const string BorderTrigger = "BorderTrigger";

    private WheelController wheelController;

    [SerializeField]
    private WheelType wheelType;

    private bool isCollidingBorder;
    private bool isCollidingBeyondRestrictionsFrontWheel;
    private bool isCollidingBeyondRestrictionsRearWheel;

    private BorderTrigger borderTrigger;
    private ViolationTriggerBeyondRestrictions violationTriggerBeyondRestrictions;

    private void Start()
    {
        wheelController = GetComponent<WheelController>();
    }

    private void Update()
    {
        if (!isCollidingBorder)
        {
            borderTrigger?.EndContact();
        }
        isCollidingBorder = false;

        switch (wheelType)
        {
            case WheelType.FrontWheel:
                if (!isCollidingBeyondRestrictionsFrontWheel)
                {
                     violationTriggerBeyondRestrictions?.EndContact(wheelType);
                    violationTriggerBeyondRestrictions = null;
                }
                isCollidingBeyondRestrictionsFrontWheel = false;
                break;
            case WheelType.RearWheel:
                if (!isCollidingBeyondRestrictionsRearWheel)
                {
                    violationTriggerBeyondRestrictions?.EndContact(wheelType);
                    violationTriggerBeyondRestrictions = null;
                }
                isCollidingBeyondRestrictionsRearWheel = false;
                break;
        }
        


        if (wheelController.HitCollider.CompareTag(Cone))
        {
            if (wheelController.HitCollider.TryGetComponent(out Cone cone))
            {
                cone.KnockedCone();
            }
        }

        if (wheelController.HitCollider.CompareTag(RoadMarkings))
        {
            if (wheelController.HitCollider.TryGetComponent(out LeavingRoadMarkingsTrigger leavingRoadMarkings))
            {
                leavingRoadMarkings.LeavingRoadMarkings(wheelController.HitPoint);
            }
        }

        if (wheelController.HitCollider.CompareTag(BorderTrigger))
        {
            if (wheelController.HitCollider.TryGetComponent(out BorderTrigger borderTrigger))
            {
                isCollidingBorder = true;
                this.borderTrigger = borderTrigger;
                borderTrigger.TriggerBorderEnter();
            }
        }
        
        if (wheelController.HitCollider.CompareTag(BorderTrigger))
        {
            if (wheelController.HitCollider.TryGetComponent(out ViolationTriggerBeyondRestrictions violationTriggerBeyondRestrictions))
            {
                switch (wheelType)
                {
                    case WheelType.FrontWheel:
                        isCollidingBeyondRestrictionsFrontWheel = true;
                        break;
                    case WheelType.RearWheel:
                        isCollidingBeyondRestrictionsRearWheel = true;
                        break;
                }
                this.violationTriggerBeyondRestrictions = violationTriggerBeyondRestrictions;
                violationTriggerBeyondRestrictions.HittingObstacle(wheelController.HitNormal, wheelType);
            }
        }
    }
}