Use an instance storage dict
to avoid main store pollution and evals
This commit is contained in:
parent
caa4cd0b2c
commit
34547cb0ad
@ -1,6 +1,9 @@
|
|||||||
init 5 python:
|
init 5 python:
|
||||||
class DollChibi(renpy.Displayable):
|
class DollChibi(renpy.Displayable):
|
||||||
|
|
||||||
|
# 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, **properties):
|
||||||
|
|
||||||
super().__init__(**properties)
|
super().__init__(**properties)
|
||||||
@ -35,6 +38,8 @@ init 5 python:
|
|||||||
self.atl_pause = False
|
self.atl_pause = False
|
||||||
self.atl_at_list = []
|
self.atl_at_list = []
|
||||||
|
|
||||||
|
self.instances[name] = self
|
||||||
|
|
||||||
def register(self, pose, frames, size):
|
def register(self, pose, frames, size):
|
||||||
self.poses[pose] = (frames, size)
|
self.poses[pose] = (frames, size)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user