用户:
c吃药查看:0 回复:0 评论:0 创建时间:2024-05-10T20:54:18
【作品展示】

【作品介绍】
左键移动
【作品源代码】
import pgzrun
from random import randint
TITLE = "666"
WIDTH = 800
HEIGHT = 600
x = 400
y = 300
c = 'red'
def draw():
screen.fill('white')
screen.draw.filled_circle((x,y),50,c)
def on_mouse_move(pos,rel,buttons):
global x,y,c
print(pos, type(buttons), buttons)
if mouse.LEFT in buttons:
x = pos[0]
y = pos[1]
if mouse.RIGHT in buttons:
c = (randint(0, 255),randint(0, 255),randint(0, 255))
pgzrun.go()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn