python 之问题

object has no attribute 'add_internal'

from pygame.sprite import Sprite

正确
class Ship(Sprite):
    def __init__(self, screen, ai_setting):
        """初始化飞船位置"""
        super(Ship, self).__init__()
        ...
报错
class Ship:
    def __init__(self, screen, ai_setting):
        """初始化飞船位置"""
        super(Ship, self).__init__()

 

posted @ 2022-12-08 21:38  三分书生气  阅读(59)  评论(0)    收藏  举报