Code: Select all
transform change_transform(old, new):
contains:
old
alpha 1.0
linear 0.3 alpha 0.0
contains:
new
alpha 0.0
linear 0.3 alpha 1.0
define config.side_image_change_transform = change_transform
image side mary_face = ConditionSwitch(
"rf == 'base'", Image("images/side_mary.png", yalign=1.0, xalign=1.0),
"rf == 'angry'", Image("images/side_mary angry.png", yalign=1.0, xalign=1.0),
"rf == 'sad'", Image("images/side_mary sad.png", yalign=1.0, xalign=1.0),
"rf == None", Image("images/side_side_mary.png", yalign=1.0, xalign=1.0)
)
Code: Select all
image side erin_small = LiveComposite(
(617, 653),
(0, 0), "ebase.png",
(135, 241),
ConditionSwitch(
"efe == 'norm'", ConditionSwitch("str(ep) == 'type1'", "eyes type1","str(ep) == 'type2'","eyes type2","str(ep) == 'type3'", "eyes type3"),
"efe == 'glance'", ConditionSwitch("str(ep) == 'type1'", "eyes type1_glance","str(ep) == 'type2'","eyes type2_glance","str(ep) == 'type3'", "eyes type3_glance"),
"efe == 'nar'", ConditionSwitch("str(ep) == 'type1'", "eyes type1_nar","str(ep) == 'type2'","eyes type2_nar","str(ep) == 'type3'", "eyes type3_nar"),
"efe == 'sur'", ConditionSwitch("str(ep) == 'type1'", "eyes type1_sur","str(ep) == 'type2'","eyes type2_sur","str(ep) == 'type3'", "eyes type3_sur")
),
(179, 360), ConditionSwitch("efm == 'close'", "images/mouth.png","efm == 'part'", "images/mouth-part.png","efm == 'open'", "images/mouth-yell.png"),
(113, 203), ConditionSwitch("efb == 'norm'", "images/b.png","efb == 'nar'", "images/b-frown.png","efb == 'huh'", "images/b-huh.png","efb == 'sad'", "images/b-sad.png","efb == 'sur'", "images/b-sur.png"))