本帖最后由 David_Exmachina 于 2018-8-11 12:48 编辑
#-------------------------------------------------------------------------- # ● 名称的描绘 # actor : 角色 # x : 描画目标 X 坐标 # y : 描画目标 Y 坐标 #-------------------------------------------------------------------------- def draw_actor_name(actor, x, y) case actor.id when 1 self.contents.font.color = normal_color when 2 self.contents.font.color = Color.new(173, 210, 32, 255) when 3 self.contents.font.color = Color.new(0, 0, 0, 255) when 4 self.contents.font.color = Color.new(191, 98, 10, 255) when 5 self.contents.font.color = Color.new(114, 51, 4, 255) when 6 self.contents.font.color = Color.new(233, 33, 33, 255) when 7 self.contents.font.color = Color.new(252, 52, 52, 255) when 8 self.contents.font.color = Color.new(111, 111, 111, 255) end self.contents.draw_text(x, y, 120, 32, actor.name) self.contents.font.color = normal_color # 防止其他的某些文字变成这样的颜色(可根据实际情况省略) end
#--------------------------------------------------------------------------
# ● 名称的描绘
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
case actor.id
when 1
self.contents.font.color = normal_color
when 2
self.contents.font.color = Color.new(173, 210, 32, 255)
when 3
self.contents.font.color = Color.new(0, 0, 0, 255)
when 4
self.contents.font.color = Color.new(191, 98, 10, 255)
when 5
self.contents.font.color = Color.new(114, 51, 4, 255)
when 6
self.contents.font.color = Color.new(233, 33, 33, 255)
when 7
self.contents.font.color = Color.new(252, 52, 52, 255)
when 8
self.contents.font.color = Color.new(111, 111, 111, 255)
end
self.contents.draw_text(x, y, 120, 32, actor.name)
self.contents.font.color = normal_color # 防止其他的某些文字变成这样的颜色(可根据实际情况省略)
end
这是根据角色的ID来变更名字颜色的脚本,
有多少角色就把when和下一行复制到有几个为止,
这上面的颜色代码可根据自己的喜好来更改。 |