From 824a7e33eac3f78b7d6d22e8728c6f7c0bb41801 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Thu, 14 May 2020 12:05:52 +0200 Subject: [PATCH] draw method sets mapOffset field properly --- src/game/Screen.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/Screen.py b/src/game/Screen.py index fbb8044..6ee9c66 100644 --- a/src/game/Screen.py +++ b/src/game/Screen.py @@ -58,6 +58,11 @@ class Screen: sprite.rect.x += self.mapCoord + self.mapSize elif location.value == Locations.MAP.value: sprite.rect.x += self.mapCoord + + # Update Entities mapOffset field + from src.entities.Entity import Entity + if isinstance(sprite, Entity): + sprite.mapOffset = self.mapCoord self.gameObject.spritesList.add(sprite) def getUiWidth(self, location: Locations):