renpy入门L3
- 角色与图像
- 角色:用Character()类定义的角色
指定:
what_:对话框属性
who_:人物名属性
属性:
size:文本大小
volor:颜色
outlines:外边框 [(宽度,颜色,x偏移,y偏移)]
font:字体
prefix:前缀
suffix:后缀
image:图像
window_background:背景框
bold:粗体,接布尔类型数值
define a = Character("教程角色A",what_size=35,who_size = 50,who_color="#8B0000",who_outlines=[(2,"#FFFFE0",0,0)],who_prefix="【前缀】",what_suffix=",这是后缀",what_bold=True)label start: a "测试一下character类的属性参数"return
- 头像:显示在对话框前的头像
image side [groupName] [name] = [imageAddress]
define a = Character("教程角色A",image="avatar")image side avatar nor = "images/aside1.png"image side avatar bro = "images/aside2.png"label start: a "测试一下头像" a nor "现在我是正常的" a bro "现在我是损坏的"return
- 角色图像自动切换:角色图像跟随头像变化
可添加全局变量实现溶解过渡:define config.say_attribute_transition = dissolve
define a = Character("教程角色A",image="avatar")define config.say_attribute_transition = dissolveimage side avatar = "images/aside1.png"image side avatar nor = "images/aside1.png"image side avatar bro = "images/aside2.png"image avatar = "images/Asmile.png"image avatar nor = "images/Asmile.png"image avatar bro = "images/Abroke.png"label start: show avatar a "测试一下头像" a nor "现在我是正常的" a bro "现在我是损坏的"return
- 角色:用Character()类定义的角色