.direction == : .rect.left = tank.rect.left - .rect.width .rect.top = tank.rect.top + tank.rect.height/- .rect.height/.direction == : .rect.left = tank.rect.left + tank.rect.width .rect.top = tank.rect.top + tank.rect.height/- .rect.height/.direction == : .rect.left = tank.rect.left + tank.rect.width/- .rect.width/.rect.top = tank.rect.top - .rect.height .direction == : .rect.left = tank.rect.left + tank.rect.width/- .rect.width/.rect.top = tank.rect.top + tank.rect.height
这一部分中的self.rect.left, self.rect.top, tank. rect.top, tank.rect.left,
self.rect.width, self.rect.height是怎么来的呀,上面好像没有定义呀
这里开始的章节都要用到vsc和pycharm的虚拟环境吗
老师,为什么主类方法格式是(self)->None:
而坦克类方法格式是(self):
这个安装不上
这老师是什么情况
Tank(): (,left:,top:) -> : .images = {:pygame.image.load(), :pygame.image.load(), :pygame.image.load(), :pygame.image.load()} .direction = .images = .images.get(.direction) .rect = .images.get_rect() .rect.left = left .rect.top = top (): (): (): () -> : .images = .images.get(.direction) MainGame.window.blit(.images,.rect)
为什么我的displayTank方法中的self.images = self.images.get(self.direction)
会报错,错因是Surface没有get方法,而初始化__init__里使用是正常的
老师,为什么加载我方坦克的时候不放在MyTank类里边
英语读的不行就换个方式嘛,害得每次都不知道在讲什么,还得重看一眼(quit-->Q特可还行)
老师,我这里那里错了?
把第二行for循环删掉为什么不能运行呢?直接e.write(f)为什么不行?
老师,我复制a的内容到b里去,为什么不是复制到之前已经建好的记事本里,而是自动新建了一个命名为b的记事本?
老师,为什么我的a.txt读完之后莫名其妙就空白了
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637