Ejemplo n.º 1
0
    // Token: 0x06000CF9 RID: 3321 RVA: 0x0005CCEC File Offset: 0x0005AEEC
    public static EffectArea IsPointInsideArea(Vector3 p, EffectArea.Type type, float radius = 0f)
    {
        int num = Physics.OverlapSphereNonAlloc(p, radius, EffectArea.m_tempColliders, EffectArea.m_characterMask);

        for (int i = 0; i < num; i++)
        {
            EffectArea component = EffectArea.m_tempColliders[i].GetComponent <EffectArea>();
            if (component && (component.m_type & type) != (EffectArea.Type) 0)
            {
                return(component);
            }
        }
        return(null);
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Resize child EffectArea's collision that matches the specified type(s).
 /// </summary>
 public static void ResizeChildEffectArea(MonoBehaviour parent, EffectArea.Type includedTypes, float newRadius)
 {
     if (parent != null)
     {
         EffectArea effectArea = parent.GetComponentInChildren <EffectArea>();
         if (effectArea != null)
         {
             if ((effectArea.m_type & includedTypes) != 0)
             {
                 SphereCollider collision = effectArea.GetComponent <SphereCollider>();
                 if (collision != null)
                 {
                     collision.radius = newRadius;
                 }
             }
         }
     }
 }