资源简介

飞机大战

资源截图

代码片段和文件信息

import pygame


class Bullet(pygame.sprite.Sprite):
    def __init__(self x y num):
        pygame.sprite.Sprite.__init__(self)
        self.music = ‘music/bullet.wav‘
        self.image_str = ‘image/bullet%s.png‘%(num)
        self.image = pygame.image.load(self.image_str).convert_alpha()
        self.rect = self.image.get_rect()
        self.rect.left self.rect.top = ((x*2)-self.rect.w)//2 y
        self.speed = 12
        self.disappear = False
        self.mask = pygame.mask.from_surface(self.image)
        

    def move(self):
        self.rect.top -= self.speed
        if self.rect.top < 0:
            self.disappear = True

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-10-22 23:59  SunPyPlane-master\
     文件          46  2017-10-22 23:59  SunPyPlane-master\.gitignore
     文件        1064  2017-10-22 23:59  SunPyPlane-master\LICENSE
     文件        1290  2017-10-22 23:59  SunPyPlane-master\README.md
     文件         643  2017-10-22 23:59  SunPyPlane-master\bullet.py
     文件        3441  2017-10-22 23:59  SunPyPlane-master\enemy.py
     目录           0  2017-10-22 23:59  SunPyPlane-master\font\
     文件       78500  2017-10-22 23:59  SunPyPlane-master\font\font.ttf
     目录           0  2017-10-22 23:59  SunPyPlane-master\image\
     文件       24728  2017-10-22 23:59  SunPyPlane-master\image\Protection_cover.png
     文件        4559  2017-10-22 23:59  SunPyPlane-master\image\about_me.png
     文件        6567  2017-10-22 23:59  SunPyPlane-master\image\again.png
     文件       48286  2017-10-22 23:59  SunPyPlane-master\image\background.png
     文件         600  2017-10-22 23:59  SunPyPlane-master\image\bullet1.png
     文件        6739  2017-10-22 23:59  SunPyPlane-master\image\bullet10.png
     文件        2989  2017-10-22 23:59  SunPyPlane-master\image\bullet2.png
     文件         281  2017-10-22 23:59  SunPyPlane-master\image\bullet3.png
     文件         539  2017-10-22 23:59  SunPyPlane-master\image\bullet4.png
     文件         670  2017-10-22 23:59  SunPyPlane-master\image\bullet5.png
     文件        1482  2017-10-22 23:59  SunPyPlane-master\image\bullet6.png
     文件        1018  2017-10-22 23:59  SunPyPlane-master\image\bullet7.png
     文件        1388  2017-10-22 23:59  SunPyPlane-master\image\bullet8.png
     文件        1452  2017-10-22 23:59  SunPyPlane-master\image\bullet9.png
     文件        1819  2017-10-22 23:59  SunPyPlane-master\image\enemy1.png
     文件        2453  2017-10-22 23:59  SunPyPlane-master\image\enemy1_down1.png
     文件        2815  2017-10-22 23:59  SunPyPlane-master\image\enemy1_down2.png
     文件        3624  2017-10-22 23:59  SunPyPlane-master\image\enemy1_down3.png
     文件        2749  2017-10-22 23:59  SunPyPlane-master\image\enemy1_down4.png
     文件        7274  2017-10-22 23:59  SunPyPlane-master\image\enemy2.png
     文件        7542  2017-10-22 23:59  SunPyPlane-master\image\enemy2_down1.png
     文件        7609  2017-10-22 23:59  SunPyPlane-master\image\enemy2_down2.png
............此处省略48个文件信息

评论

共有 条评论