public static bool Check(Entity a, CollidableComponent b, Vector2 at)
        {
            Vector2 old = a.Position;

            a.Position = at;
            bool ret = Check(a, b);

            a.Position = old;
            return(ret);
        }
 public static bool Check(Entity a, CollidableComponent b)
 {
     if (a.Collider == null || b.Collider == null)
     {
         return(false);
     }
     else
     {
         return(b.Collidable && b.Entity.Collidable && a.Collider.Collide(b));
     }
 }
Exemple #3
0
 public bool Collide(CollidableComponent component)
 {
     return(Collide(component.Collider));
 }
 public bool CollideCheck(CollidableComponent other, Vector2 at)
 {
     return(Collide.Check(this, other, at));
 }
 public bool CollideCheck(CollidableComponent other)
 {
     return(Collide.Check(this, other));
 }