Take the doll parameter

This commit is contained in:
Gouvernathor 2024-04-04 23:34:35 +02:00
parent 94b5ea15a5
commit e129921bc0

View File

@ -4,7 +4,7 @@ init 5 python:
# class attribute
instances = {}
def __init__(self, name, layer="screens", zorder=12, zoom=0.28, **properties):
def __init__(self, name, layer="screens", zorder=12, zoom=0.28, doll=None, **properties):
super().__init__(**properties)
@ -18,7 +18,9 @@ init 5 python:
self.zoom = zoom
self.pos = (0,0)
self.xzoom = 1
self.char = states.dolls[name]
if doll is None:
doll = states.dolls[name]
self.char = doll
self.poses = {}
# Animation