热门

最新

红包

立Flag

投票

同城

我的

发布
m0_52667430
m0_52667430
5 年前
truem0_52667430

if event.type == MOUSEBUTTONDOWN :
if event.button == 1 :
if speed_rect.collidepoint(event.pos) :
for each in enemies :
each.accelerate *= 2
if pause_rect.collidepoint(event.pos) :
paused = not paused
for each in towers_pos :
if each.rect.collidepoint(event.pos) :
photo = Image.PhotoImage(file=r"zt.gif")
photo1 = tkinter.PhotoImage(file=r"zt.gif")
photo2 = tkinter.PhotoImage(file=r"zt.gif")
button_3 = BUTTON(screen , (each.rect.left + 30 , each.rect.top - 30) , image=photo)
button_2 = BUTTON(screen , (each.rect.left + 30 , each.rect.top) , image=photo1)







请问我这个用鼠标点击事件配合按钮,为什么加载错误,有没有什么好的方法吗?我这个类似于保卫萝卜的炮塔升级,怎么写代码呀

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
小白一枚请大佬解释一下这是什么?
立即登录