Browse Source

Pygame

pull/86/head
Jure Šorn 3 years ago
parent
commit
2e043eafc6
2 changed files with 4 additions and 4 deletions
  1. 4
      README.md
  2. 4
      index.html

4
README.md

@ -2940,8 +2940,8 @@ while all(event.type != pg.QUIT for event in pg.event.get()):
```
```python
<bool> = <Rect>.collidepoint((x, y)) # Tests if point is inside the rectangle.
<bool> = <Rect>.colliderect(<Rect>) # Tests if the two rectangles overlap.
<bool> = <Rect>.collidepoint((x, y)) # Checks if rectangle contains a point.
<bool> = <Rect>.colliderect(<Rect>) # Checks if two rectangles overlap.
<int> = <Rect>.collidelist(<list_of_Rect>) # Returns index of first colliding Rect or -1.
<list> = <Rect>.collidelistall(<list_of_Rect>) # Returns indexes of all colliding Rects.
```

4
index.html

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

Loading…
Cancel
Save