예제 #1
0
    public static bool CheckCapsule <T>(
        Vector3 start,
        Vector3 end,
        float radius,
        int layerMask = -5,
        QueryTriggerInteraction triggerInteraction = 1)
        where T : Component
    {
        List <Collider> list = (List <Collider>)Pool.GetList <Collider>();

        GamePhysics.OverlapCapsule(start, end, radius, list, layerMask, triggerInteraction);
        int num = GamePhysics.CheckComponent <T>(list) ? 1 : 0;

        // ISSUE: cast to a reference type
        Pool.FreeList <Collider>((List <M0>&) ref list);
        return(num != 0);
    }