Exemple #1
0
        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));
        }
Exemple #2
0
        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));
        }