public sealed override bool Overlaps(Collider collider, out CollisionResult result) { if (base.Overlaps(collider, out result)) { if (collider is ShapeCollider) { Manifold hit; var shape = (collider as ShapeCollider).Shape; if (Shape.Overlaps(shape, out hit)) { result.Add(hit); return(true); } } else if (collider is TileMapCollider) { var tileMapCollider = collider as TileMapCollider; return(tileMapCollider.Overlaps(this, out result)); } } return(false); }
public virtual bool Overlaps(Shape shape, out CollisionResult result) { result = new CollisionResult(this); return(shape != null && IsCollidable); }
public bool Overlaps(Shape shape, bool nearestAxis, out CollisionResult result) { result = default; return(false); }