/// <summary> /// 只检查是否可见 /// </summary> public void CheckVisible(uint frame) { if (frame > lastUpdateFrame) { lastUpdateFrame = frame; isVisible = rectBounds.Overlaps(scrollSystem.scrollBounds); } }
/// <summary> /// 只检查是否可见 /// </summary> public bool IsVisible() { if (Time.frameCount == lastFrameCount) { return(this.isVisible); } this.lastFrameCount = Time.frameCount; this.isVisible = bounds.Overlaps(scrollSystem.bounds); return(this.isVisible); }