25 lines
422 B
C#
25 lines
422 B
C#
using Godot;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Rokojori
|
|
{
|
|
public class Overlap2D
|
|
{
|
|
public static bool Has( Box2 a, Box2 b )
|
|
{
|
|
if ( ! Range.Overlap( a.min.Y, a.max.Y, b.min.Y, b.max.Y ) )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if ( ! Range.Overlap( a.min.X, a.max.X, b.min.X, b.max.X ) )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|