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
885 B

import pygame
from classes.towers.tower import Tower
from classes.settings import Settings
from classes.towers.projectiles.bubble import Bubble
class Bubbler(Tower):
def __init__(self, gridPos):
settings = Settings()
# Make a surface
surface = pygame.Surface(
(settings.gridSize, settings.gridSize),
pygame.SRCALPHA
)
# And fill it with a square the same size.
pygame.draw.rect(
surface,
(0, 0, 255),
surface.get_rect(),
0
)
# Call the generic Tower constructor
super(self.__class__, self).__init__(
fireRate=250,
damage=10,
range=settings.gridSize * 8,
speed=settings.gridSize * 2.5,
surface=surface,
gridPos=gridPos,
projectile=Bubble,
)