Deprecated: Required parameter $query follows optional parameter $post in /var/www/html/wp-content/plugins/elementor-extras/modules/breadcrumbs/widgets/breadcrumbs.php on line 1215
Tobi Movement with Buttons - Python - Example Project
Table of Contents

Tobi Movement with Buttons – Python

Example Description
The example demonstrates how to make the sprite movement with Quarky buttons.

Code

sprite = Sprite('Tobi')
quarky=Quarky()

while True:
  if quarky.readpushbutton("L"):
    sprite.move(-10)
  elif quarky.readpushbutton("R"):
    sprite.move(10)

Output

[PictoBloxExtension]