|
|
@ -2437,7 +2437,7 @@ rect = pg.Rect(<span class="hljs-number">240</span>, <span class="hljs-number">2 |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
|
|
|
|
<pre><code class="python language-python hljs"><bool> = <Rect>.collidepoint((x, y)) <span class="hljs-comment"># Checks if rectangle contains a point.</span> |
|
|
|
<pre><code class="python language-python hljs"><bool> = <Rect>.collidepoint((x, y)) <span class="hljs-comment"># Checks if rectangle contains the point.</span> |
|
|
|
<bool> = <Rect>.colliderect(<Rect>) <span class="hljs-comment"># Checks if two rectangles overlap.</span> |
|
|
|
<int> = <Rect>.collidelist(<list_of_Rect>) <span class="hljs-comment"># Returns index of first colliding Rect or -1.</span> |
|
|
|
<list> = <Rect>.collidelistall(<list_of_Rect>) <span class="hljs-comment"># Returns indexes of all colliding rectangles.</span> |
|
|
|