Add Smachni_code1
parent
79498702b8
commit
e18a6a06bb
|
@ -0,0 +1,15 @@
|
||||||
|
from settings import SCREEN_HEIGHT, SCREEN_WIDTH
|
||||||
|
import random
|
||||||
|
import pygame
|
||||||
|
|
||||||
|
class Enemy(pygame.sprite.Sprite):
|
||||||
|
def __init__(self):
|
||||||
|
super(Enemy, self).__init__()
|
||||||
|
self.surf = pygame.Surface((20, 10))
|
||||||
|
self.surf.fill((255, 0, 0))
|
||||||
|
self.rect = self.surf.get_rect(
|
||||||
|
center=(
|
||||||
|
random.randint(SCREEN_WIDTH + 20, SCREEN_WIDTH + 100),
|
||||||
|
random.randint(0, SCREEN_HEIGHT),
|
||||||
|
)
|
||||||
|
)
|
Loading…
Reference in New Issue