public override bool Collides(CompoundCollider compound, ref Collision collisionInfo) { if (BoundingCollider.Collides(compound.BoundingCollider, ref collisionInfo)) { for (int i = 0; i < colliders.Count; i++) { for (int j = 0; j < compound.colliders.Count; j++) { if (colliders[i].Collides(compound.colliders[j], ref collisionInfo)) { return(true); } } } } return(false); }
public abstract bool Collides(CompoundCollider compound, ref Collision collisionInfo);
//Circle vs Compound public override bool Collides(CompoundCollider compound, ref Collision collisionInfo) { return(compound.Collides(this, ref collisionInfo)); }