My OOP practice project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
596 B

4 years ago
import pygame
from player import *
4 years ago
from bullets import Bullet
4 years ago
class Enemy:
def __init__(self):
self.enemy_x = 100
self.enemy_y = 100
self.en_width = 32
self.en_height = 64
4 years ago
def draw(self,window,en_color,en_image):
pygame.draw.rect(window,en_color,(self.enemy_x, self.enemy_y, self.en_width, self.en_height))
window.blit(en_image,(self.enemy_x, self.enemy_y))
def update(self):
4 years ago
self.enemy_x += 3
4 years ago
if self.enemy_x >= 600:
self.enemy_x = 1
def enemy_shoot(self): #Have NO IDEA how it`ll work
4 years ago
pass