public bool collides(Rectangle otherRect, cCollider c1) { if (component) { if (this.rect == otherRect || !rRef.active || !c1.rRef.active) { return(false); } } else { if (c1 == this) { return(false); } } return(rect.IntersectsWith(otherRect)); }
public bool collides(cCollider c1) { if (component) { if (this.rRef == null || c1.rRef == null || c1 == this || !c1.rRef.active || !rRef.active) { return(false); } } else { if (c1 == this) { return(false); } } return(rect.IntersectsWith(c1.rect)); }