문제

I have a ball based on a component and I've thought that using the isShowing() method would do the trick but after my ball leaves the container, (Pong game) the isShowing() method still returns true.

So does the isShowing() method check if the component is still in the container's... bounds? Or just if it is visible and the container is also visible.

...and how do I check if the component has left the container other than doing... ball.getX()+width() < container.getWidth() (sadly only for the left side, but just an example)

도움이 되었습니까?

해결책

fetch() 만 한 번만 호출하기 때문에 첫 번째 행을 반환합니다.루프에서 호출하고 결과를 배열에 축적합니다.

while ($row = $return->fetch()) {
  // Append the current row onto your array
  $this->minis[] = $row;
}
return true;
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top