資源簡介
基于pygame開發,帶背景音樂
代碼片段和文件信息
import?pygame
class?Bullet1(pygame.sprite.Sprite):
????def?__init__(self?position):
????????pygame.sprite.Sprite.__init__(self)
????????self.image?=?pygame.image.load(“images/bullet1.png“).convert_alpha()
????????self.rect?=?self.image.get_rect()
????????self.rect.left?self.rect.top?=?position
????????self.speed?=?12
????????self.active?=?False
????????self.mask?=?pygame.mask.from_surface(self.image)
????def?move(self):
????????self.rect.top?-=?self.speed
????????if?self.rect.top?0:
????????????self.active?=?False
????def?reset(self?position):
????????self.rect.left?self.rect.top?=?position
????????self.active?=?True
class?Bullet2(pygame.sprite.Sprite):
????def?__init__(self?position):
????????pygame.sprite.Sprite.__init__(self)
????????self.image?=
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-11-13?23:02??太空大戰\
?????文件????????1307??2019-10-03?22:58??太空大戰\bullet.py
?????文件????????4771??2019-10-03?22:58??太空大戰\enemy.py
?????目錄???????????0??2019-11-13?23:02??太空大戰\font\
?????文件???????78500??2019-10-03?22:59??太空大戰\font\font.ttf
?????目錄???????????0??2019-11-13?23:02??太空大戰\images\
?????文件????????6567??2019-10-03?22:59??太空大戰\images\again.png
?????文件???????32756??2019-10-03?22:59??太空大戰\images\background.png
?????文件????????8480??2019-10-03?22:59??太空大戰\images\bomb.png
?????文件????????9964??2019-10-03?22:59??太空大戰\images\bomb_supply.png
?????文件????????2989??2019-10-03?22:59??太空大戰\images\bullet1.png
?????文件????????2989??2019-10-03?22:59??太空大戰\images\bullet2.png
?????文件????????9706??2019-10-03?22:59??太空大戰\images\bullet_supply.png
?????文件????????5499??2019-10-03?22:59??太空大戰\images\enemy1.png
?????文件????????5797??2019-10-03?22:59??太空大戰\images\enemy1_down1.png
?????文件????????6181??2019-10-03?22:59??太空大戰\images\enemy1_down2.png
?????文件????????7361??2019-10-03?22:59??太空大戰\images\enemy1_down3.png
?????文件????????4199??2019-10-03?22:59??太空大戰\images\enemy1_down4.png
?????文件???????10918??2019-10-03?22:59??太空大戰\images\enemy2.png
?????文件???????12527??2019-10-03?22:59??太空大戰\images\enemy2_down1.png
?????文件???????13315??2019-10-03?22:59??太空大戰\images\enemy2_down2.png
?????文件???????14680??2019-10-03?22:59??太空大戰\images\enemy2_down3.png
?????文件????????5500??2019-10-03?22:59??太空大戰\images\enemy2_down4.png
?????文件???????11712??2019-10-03?22:59??太空大戰\images\enemy2_hit.png
?????文件???????47670??2019-10-03?22:59??太空大戰\images\enemy3_down1.png
?????文件???????50549??2019-10-03?22:59??太空大戰\images\enemy3_down2.png
?????文件???????56999??2019-10-03?22:59??太空大戰\images\enemy3_down3.png
?????文件???????60637??2019-10-03?22:59??太空大戰\images\enemy3_down4.png
?????文件???????67264??2019-10-03?22:59??太空大戰\images\enemy3_down5.png
?????文件???????10410??2019-10-03?22:59??太空大戰\images\enemy3_down6.png
?????文件???????45866??2019-10-03?22:59??太空大戰\images\enemy3_hit.png
............此處省略41個文件信息
- 上一篇:bp神經網絡python實現
- 下一篇:《python語言程序設計基礎》高清pdf
評論
共有 條評論