aliens.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:Projects 作者: it2school 项目源码 文件源码
def load_sound(file):
    if not pygame.mixer: return dummysound()
    file = os.path.join(main_dir, 'data', file)
    try:
        sound = pygame.mixer.Sound(file)
        return sound
    except pygame.error:
        print ('Warning, unable to load, %s' % file)
    return dummysound()



# each type of game object gets an init and an
# update function. the update function is called
# once per frame, and it is when each object should
# change it's current position and state. the Player
# object actually gets a "move" function instead of
# update, since it is passed extra information about
# the keyboard
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号