public override bool Collide(Hitbox hitbox) { return Intersects(hitbox); }
public abstract bool Collide(Hitbox hitbox);
public bool Intersects(Hitbox hitbox) { return AbsoluteLeft < hitbox.AbsoluteRight && AbsoluteRight > hitbox.AbsoluteLeft && AbsoluteBottom > hitbox.AbsoluteTop && AbsoluteTop < hitbox.AbsoluteBottom; }
public override bool Collide(Hitbox hitbox) { return hitbox.Collide(this); }
public override bool Collide(Hitbox hitbox) { foreach (var c in colliders) if (c.Collide(hitbox)) return true; return false; }
public Block() : base() { sprite = new FSprite("Game/green-16"); Collider = new Hitbox(16, 16); }
public override bool Collide(Hitbox hitbox) { return Collide(hitbox.Bounds); }