More splitting and minor changes

This commit is contained in:
2021-03-28 01:35:45 +03:00
parent 90ffbb6e09
commit 01d42cb80e
5 changed files with 89 additions and 46 deletions
+18
View File
@@ -0,0 +1,18 @@
"""
Floor entity class
"""
import pygame
class Floor(pygame.sprite.Sprite):
def __init__(self, mainGameClass):
pygame.sprite.Sprite.__init__(self)
self.image = pygame.Surface((mainGameClass.getScreenWidth(),
mainGameClass.getFloorHeight()))
self.image.fill((255, 204, 102))
self.rect = self.image.get_rect()
self.rect.center = (mainGameClass.getScreenWidth()/2,
mainGameClass.getScreenHeight() -
mainGameClass.getFloorHeight()/2)