Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c58b381

Browse files
committed
Pygame
1 parent c9df473 commit c58b381

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3045,14 +3045,14 @@ rect(<Surf>, color, <Rect>, width=0) # Also polygon(<Surf>, color, po
30453045

30463046
### Font
30473047
```python
3048-
<Font> = pg.font.Font(<path/file>, size) # Loads the TTF file. Pass None for default.
3048+
<Font> = pg.font.Font(<path/file>, size) # Loads TTF file. Pass None for default font.
30493049
<Surf> = <Font>.render(text, antialias, color) # Background color can be specified at the end.
30503050
```
30513051

30523052
### Sound
30533053
```python
3054-
<Sound> = pg.mixer.Sound(<path/file/bytes>) # Loads the WAV file or array of signed shorts.
3055-
<Sound>.play() # Starts playing the sound.
3054+
<Sound> = pg.mixer.Sound(<path/file/bytes>) # Loads WAV file or array of signed shorts.
3055+
<Sound>.play/stop() # Also <Sound>.set_volume(<float>).
30563056
```
30573057

30583058
### Basic Mario Brothers Example

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,12 +2482,12 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
24822482
arc(&lt;Surf&gt;, color, &lt;Rect&gt;, from_rad, to_rad) <span class="hljs-comment"># Also ellipse(&lt;Surf&gt;, color, &lt;Rect&gt;, width=0).</span>
24832483
rect(&lt;Surf&gt;, color, &lt;Rect&gt;, width=<span class="hljs-number">0</span>) <span class="hljs-comment"># Also polygon(&lt;Surf&gt;, color, points, width=0).</span>
24842484
</code></pre>
2485-
<div><h3 id="font">Font</h3><pre><code class="python language-python hljs">&lt;Font&gt; = pg.font.Font(&lt;path/file&gt;, size) <span class="hljs-comment"># Loads the TTF file. Pass None for default.</span>
2485+
<div><h3 id="font">Font</h3><pre><code class="python language-python hljs">&lt;Font&gt; = pg.font.Font(&lt;path/file&gt;, size) <span class="hljs-comment"># Loads TTF file. Pass None for default font.</span>
24862486
&lt;Surf&gt; = &lt;Font&gt;.render(text, antialias, color) <span class="hljs-comment"># Background color can be specified at the end.</span>
24872487
</code></pre></div>
24882488

2489-
<div><h3 id="sound">Sound</h3><pre><code class="python language-python hljs">&lt;Sound&gt; = pg.mixer.Sound(&lt;path/file/bytes&gt;) <span class="hljs-comment"># Loads the WAV file or array of signed shorts.</span>
2490-
&lt;Sound&gt;.play() <span class="hljs-comment"># Starts playing the sound.</span>
2489+
<div><h3 id="sound">Sound</h3><pre><code class="python language-python hljs">&lt;Sound&gt; = pg.mixer.Sound(&lt;path/file/bytes&gt;) <span class="hljs-comment"># Loads WAV file or array of signed shorts.</span>
2490+
&lt;Sound&gt;.play/stop() <span class="hljs-comment"># Also &lt;Sound&gt;.set_volume(&lt;float&gt;).</span>
24912491
</code></pre></div>
24922492

24932493
<div><h3 id="basicmariobrothersexample">Basic Mario Brothers Example</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> collections, dataclasses, enum, io, itertools <span class="hljs-keyword">as</span> it, pygame <span class="hljs-keyword">as</span> pg, urllib.request

0 commit comments

Comments
 (0)