|
|
@ -2603,7 +2603,7 @@ SIZE, MAX_SPEED = <span class="hljs-number">50</span>, P(<span class="hljs-numbe |
|
|
|
mario.facing_left = (D.w <span class="hljs-keyword">in</span> pressed) <span class="hljs-keyword">if</span> {D.e, D.w} & pressed <span class="hljs-keyword">else</span> mario.facing_left |
|
|
|
screen.blit(images[get_frame_index() + mario.facing_left * <span class="hljs-number">9</span>], mario.rect) |
|
|
|
<span class="hljs-keyword">for</span> rect <span class="hljs-keyword">in</span> tiles: |
|
|
|
screen.blit(images[<span class="hljs-number">19</span> <span class="hljs-keyword">if</span> {*rect.topleft} & {<span class="hljs-number">0</span>, (SIZE<span class="hljs-number">-1</span>)*<span class="hljs-number">16</span>} <span class="hljs-keyword">else</span> <span class="hljs-number">18</span>], rect) |
|
|
|
screen.blit(images[<span class="hljs-number">18</span> <span class="hljs-keyword">if</span> {*rect.topleft} & {<span class="hljs-number">0</span>, (SIZE<span class="hljs-number">-1</span>)*<span class="hljs-number">16</span>} <span class="hljs-keyword">else</span> <span class="hljs-number">19</span>], rect) |
|
|
|
pygame.display.flip() |
|
|
|
|
|
|
|
<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>: |
|
|
|