Example #1
0
        /**
         * Determines if a given node's bounding box is in visible bounds
         *
         * @return YES if it is in visible bounds
         */
        public bool IsNodeVisible(CCNode node)
        {
            CCPoint offset = GetContentOffset();
            CCSize size = ViewSize;
            float scale = ZoomScale;

            var viewRect = new CCRect(-offset.X / scale, -offset.Y / scale, size.Width / scale, size.Height / scale);

            return viewRect.IntersectsRect(node.BoundingBox);
        }