Skip to content

Instantly share code, notes, and snippets.

@daniel-schroeder-dev
Created July 19, 2022 22:31
Show Gist options
  • Save daniel-schroeder-dev/241a93fb261bbd3893260cde9184af93 to your computer and use it in GitHub Desktop.
Save daniel-schroeder-dev/241a93fb261bbd3893260cde9184af93 to your computer and use it in GitHub Desktop.
Luke Castle
def add_ghost(x, y, animate_vertical):
ghost = add_image("ghost.png", 50)
position_element(ghost, x, y)
# If we want to animate veritcal
animate_down(ghost, 100, 2, True)
# Otherwise
animate_right(ghost, 100, 2, True)
add_ghost(100, 200, True) # Animates up and down
add_ghost(200, 300, False) # Animates left and right
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment