draw method sets mapOffset field properly
This commit is contained in:
parent
93f4e9f53d
commit
824a7e33ea
@ -58,6 +58,11 @@ class Screen:
|
|||||||
sprite.rect.x += self.mapCoord + self.mapSize
|
sprite.rect.x += self.mapCoord + self.mapSize
|
||||||
elif location.value == Locations.MAP.value:
|
elif location.value == Locations.MAP.value:
|
||||||
sprite.rect.x += self.mapCoord
|
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)
|
self.gameObject.spritesList.add(sprite)
|
||||||
|
|
||||||
def getUiWidth(self, location: Locations):
|
def getUiWidth(self, location: Locations):
|
||||||
|
Loading…
Reference in New Issue
Block a user