我有一个名为score的livewires.games.Text对象,我正试图从中获取值。我试着把它转换成一个doing scores = str(self.scores)甚至是一个for循环:
scores = str(self.score)
for item in scores:
print(item)我得到的只有<livewires.games.Text object at 0x1017aca58>
我正在尝试将比分转换成int(),这样我就可以在我正在工作的游戏中使用它来提升我的关卡。
以前有人用过livewire吗?有没有办法把<livewires.games.Text object at 0x1017aca58>变成int()?
发布于 2016-07-29 09:47:53
我要做的就是:
score = self.score.value
if score % 100 == 0:
self.level += 1
games.screen.add(self.level_msg)https://stackoverflow.com/questions/38649136
复制相似问题