上传文件至 ''
This commit is contained in:
parent
c9ad572acf
commit
5f2be3f4a3
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1,19 @@
|
||||||
|
import pygame
|
||||||
|
from pygame.sprte import sprite
|
||||||
|
|
||||||
|
class Alien(sprite):
|
||||||
|
def _init_(self, ai_settings, screen):
|
||||||
|
super()._init_()
|
||||||
|
self.screen = screen
|
||||||
|
self.ai_settings = ai_settings
|
||||||
|
|
||||||
|
self.image = pygame.image.load()
|
||||||
|
self.rect = self.image.get_rect()
|
||||||
|
|
||||||
|
self.rect.x = self.rect.width
|
||||||
|
self.rect.y = self.rect.height
|
||||||
|
|
||||||
|
self.x = float(self.rect.x)
|
||||||
|
|
||||||
|
def blitme(self):
|
||||||
|
self.screen.blit(self.image, self.rect)
|
Loading…
Reference in New Issue