X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=tabakrolletjie%2Fscenes%2Fnight.py;h=fe1fae3860d1d87bcb2b8a77d2ff895afff904ed;hb=5cfb0b7b438b7cfe15c1e481883b3a95bf9c7c44;hp=c532c77159c623f9cedb0a8000f69ef72da1cd16;hpb=1a207c0ab976690b60d2a61fa95ff7990f214de1;p=tabakrolletjie.git diff --git a/tabakrolletjie/scenes/night.py b/tabakrolletjie/scenes/night.py index c532c77..fe1fae3 100644 --- a/tabakrolletjie/scenes/night.py +++ b/tabakrolletjie/scenes/night.py @@ -1,6 +1,7 @@ """ In the night, the mould attacks. """ import pygame.locals as pgl +import pygame.surface import pymunk @@ -10,6 +11,7 @@ from ..obstacles import ObstacleManager from ..enemies import Boyd from ..events import SceneChangeEvent from ..utils import debug_timer +from ..loader import loader from ..turnip import Turnip @@ -26,8 +28,14 @@ class NightScene(BaseScene): @debug_timer("night.render") def render(self, surface, gamestate): - surface.fill((0, 0, 155)) + surface.blit(loader.load_image("textures", "soil.png"), (0, 0)) + darkness = pygame.surface.Surface(surface.get_size()) + darkness = darkness.convert_alpha() + darkness.fill((0, 0, 0, 150)) + surface.blit(darkness, (0, 0)) + self._mould.render(surface) + for turnip in self._turnips[:]: if turnip.eaten: self._turnips.remove(turnip)