public void SetFlag(ColliderInfo.Flags f, bool b) { if (b) { this.flags |= f; return; } this.flags &= ~f; }
public void SetFlag(ColliderInfo.Flags f, bool b) { if (b) { this.flags |= f; } else { this.flags &= ~f; } }
private static bool CheckFlags(List <Collider> list, ColliderInfo.Flags ignore) { for (int index = 0; index < list.Count; ++index) { ColliderInfo component = (ColliderInfo)((Component)list[index]).get_gameObject().GetComponent <ColliderInfo>(); if (Object.op_Equality((Object)component, (Object)null) || !component.HasFlag(ignore)) { return(true); } } return(false); }
public static bool CheckOBB(OBB obb, int layerMask, ColliderInfo.Flags ignore) { if ((int)ignore == 0) { return(GamePhysics.CheckOBB(obb, layerMask, QueryTriggerInteraction.UseGlobal)); } List <Collider> list = Pool.GetList <Collider>(); GamePhysics.OverlapOBB(obb, list, layerMask, QueryTriggerInteraction.Ignore); bool flag = DeployVolume.CheckFlags(list, ignore); Pool.FreeList <Collider>(ref list); return(flag); }
public static bool CheckSphere(Vector3 pos, float radius, int layerMask, ColliderInfo.Flags ignore) { if ((int)ignore == 0) { return(GamePhysics.CheckSphere(pos, radius, layerMask, QueryTriggerInteraction.UseGlobal)); } List <Collider> list = Pool.GetList <Collider>(); GamePhysics.OverlapSphere(pos, radius, list, layerMask, QueryTriggerInteraction.Ignore); bool flag = DeployVolume.CheckFlags(list, ignore); Pool.FreeList <Collider>(ref list); return(flag); }
public static bool CheckOBB(OBB obb, int layerMask, ColliderInfo.Flags ignore) { if (ignore == (ColliderInfo.Flags) 0) { return(GamePhysics.CheckOBB(obb, layerMask, (QueryTriggerInteraction)0)); } List <Collider> list = (List <Collider>)Pool.GetList <Collider>(); GamePhysics.OverlapOBB(obb, list, layerMask, (QueryTriggerInteraction)1); int num = DeployVolume.CheckFlags(list, ignore) ? 1 : 0; // ISSUE: cast to a reference type Pool.FreeList <Collider>((List <M0>&) ref list); return(num != 0); }
private static bool CheckFlags(List <Collider> list, ColliderInfo.Flags ignore) { for (int i = 0; i < list.Count; i++) { ColliderInfo component = list[i].gameObject.GetComponent <ColliderInfo>(); if (component == null) { return(true); } if (!component.HasFlag(ignore)) { return(true); } } return(false); }
public static bool CheckCapsule( Vector3 start, Vector3 end, float radius, int layerMask, ColliderInfo.Flags ignore) { if (ignore == (ColliderInfo.Flags) 0) { return(GamePhysics.CheckCapsule(start, end, radius, layerMask, (QueryTriggerInteraction)0)); } List <Collider> list = (List <Collider>)Pool.GetList <Collider>(); GamePhysics.OverlapCapsule(start, end, radius, list, layerMask, (QueryTriggerInteraction)1); int num = DeployVolume.CheckFlags(list, ignore) ? 1 : 0; // ISSUE: cast to a reference type Pool.FreeList <Collider>((List <M0>&) ref list); return(num != 0); }
public bool HasFlag(ColliderInfo.Flags f) { return((this.flags & f) == f); }