Created
May 26, 2020 21:15
-
-
Save KramKroc/9826f5917fbf85e29c6d20f6446e3de2 to your computer and use it in GitHub Desktop.
Looping our character in and out of screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WIDTH = 400 | |
HEIGHT = 600 | |
alien = Actor('alien', midbottom=(100,200)) | |
def draw(): | |
screen.clear() | |
alien.draw() | |
def update(): | |
alien.left += 1 | |
if alien.left > WIDTH: | |
alien.right = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment