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.
 
 

34 lines
872 B

import pygame
from classes.settings import Settings
from classes.enemies.enemy import Enemy
class Ogre(Enemy):
def __init__(self, gridPos):
settings = Settings()
# One quarter grid size
one_quarter = round(settings.gridSize / 4)
# Make a surface
surface = pygame.Surface(
(one_quarter * 3, one_quarter * 3),
pygame.SRCALPHA
)
# And fill it with a circle
pygame.draw.circle(
surface,
(0, 255, 0),
(round(one_quarter * 1.5), round(one_quarter * 1.5)),
round(one_quarter * 1.5),
0
)
# Call the generic Enemy constructor
super(self.__class__, self).__init__(
gridPos=gridPos,
surface=surface,
health=200,
speed=settings.gridSize * 2.5,
)