我的代码
from visual import *
class Punktecounter():
def __init__(self,position=(0,0), score=0):
self.counter = label(pos=position, color=color.red, text=str(score))
self.score = score
def scoring(self):
self.score = self.score+1
print (self.score)
p = Punktecounter()
while True:
p.scoring()
rate(1)
所以打印部分工作正常。但是标签没有显示分数。如何解决?