#--------------------------------------------------------------------------
# ● 绘制角色体力
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# width : 描画目标宽度
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 120)
draw_actor_hp_gauge(actor, x, y, width)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, Vocab::hp_a)
self.contents.font.color = hp_color(actor)
last_font_size = self.contents.font.size
xr = x + width
if width < 120
self.contents.draw_text(xr - 44, y, 44, WLH, actor.hp, 2)
else
self.contents.draw_text(xr - 99, y, 44, WLH, actor.hp, 2)
self.contents.font.color = normal_color
self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxhp, 2)
end
end
#--------------------------------------------------------------------------
# ● 绘制角色魔力
# actor : 角色
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# width : 描画目标宽度
#--------------------------------------------------------------------------
def draw_actor_mp(actor, x, y, width = 120)
draw_actor_mp_gauge(actor, x, y, width)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, Vocab::mp_a)
self.contents.font.color = mp_color(actor)
last_font_size = self.contents.font.size
xr = x + width
if width < 120
self.contents.draw_text(xr - 44, y, 44, WLH, actor.mp, 2)
else
self.contents.draw_text(xr - 99, y, 44, WLH, actor.mp, 2)
self.contents.font.color = normal_color
self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxmp, 2)
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |