Created
July 2, 2020 00:36
-
-
Save TFlexSoom/7a17bc4e5a4f188303772fcf04480617 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Step 1 Setup the Stage | |
| stage.set_background("winter") | |
| stage.disable_all_walls() | |
| stage.set_gravity(0.2) | |
| snowflakes = [] | |
| # Step 2 Function to Spawn Snowflakes | |
| def spawn(): | |
| # - Choose a random snowflake image | |
| # x Get a random x | |
| # x Set y to a value higher than 250 | |
| # x set size | |
| # random.choice(snowflake_images) | |
| # Step 3 Function to Loop Through the Snowflakes | |
| def wiggle(): | |
| global snowflakes | |
| for s in snowflakes: | |
| # check if s.get_y() < -250 | |
| # snowflakes.remove(s) | |
| # stage.remove_sprite(s) | |
| # set it to a random x speed that is | |
| # between -2 and 2 (this can be a float) | |
| # Step 4 Use the Functions in an infinite while loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment