HP显示有个缺点当HP到1000数字显示就会变小,非战斗界面HP绘制的我已经修改好了,但是战斗界面HP显示没有变,1000HP数字还是会变小,请问哪里可以修改? ...
莫言别离 发表于 2015-5-11 14:08 _(:з」∠)_只会用脚本改 ↓这个挺好用的。 #========================================================= ...
#==============================================================================# F01 - 细节美化 - By芙蕾娅#------------------------------------------------------------------------------# ★ - 新增 ☆ - 修改 ■ - 删除 ● - 无变更#==============================================================================module Freya # 值槽的种类 # 0 = 默认 # 1 = 描绘边框 # 2 = 渐变 # 3 = 描绘边框 + 渐变 Gauge_Type = 3end#==============================================================================# ■ Window_Base#------------------------------------------------------------------------------# 游戏中所有窗口的父类#==============================================================================class Window_Base < Window #-------------------------------------------------------------------------- # ☆ 放大字体尺寸 # 放大字体尺寸从8更改为4 #-------------------------------------------------------------------------- def make_font_bigger contents.font.size += 4 if contents.font.size <= 64 end #-------------------------------------------------------------------------- # ☆ 缩小字体尺寸 # 缩小字体尺寸从8更改为4 #-------------------------------------------------------------------------- def make_font_smaller contents.font.size -= 4 if contents.font.size >= 16 end #-------------------------------------------------------------------------- # ☆ 绘制值槽 # rate : 比率(1.0 为满值) # color1 : 渐变色的左端 # color2 : 渐变色的右端 # 增加了绘制种类 #-------------------------------------------------------------------------- def draw_gauge(x, y, width, rate, color1, color2) if Freya::Gauge_Type == 0 fill_w = (width * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, gauge_back_color) contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2) elsif Freya::Gauge_Type == 1 fill_w = ((width - 2) * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, gauge_back_color) contents.gradient_fill_rect(x + 1, gauge_y + 1, fill_w, 4, color1, color2) elsif Freya::Gauge_Type == 2 fill_w = ((width) * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, gauge_back_color) contents.gradient_fill_rect(x, gauge_y, fill_w / 2, 6, color1, color2) contents.gradient_fill_rect(x + fill_w / 2, gauge_y, fill_w / 2, 6, color2, color1) elsif Freya::Gauge_Type == 3 fill_w = ((width - 2) * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, gauge_back_color) contents.gradient_fill_rect(x + 1, gauge_y + 1, fill_w / 2, 4, color1, color2) contents.gradient_fill_rect(x + 1 + fill_w / 2, gauge_y + 1, fill_w / 2, 4, color2, color1) end end #-------------------------------------------------------------------------- # ☆ 以 当前值/最大值 这样的分数形式绘制当前值和最大值 # current : 当前值 # max : 最大值 # color1 : 当前值的颜色 # color2 : 最大值的颜色 # 稍微缩小字体大小,移动一些坐标 #-------------------------------------------------------------------------- def draw_current_and_max_values(x, y, width, current, max, color1, color2) change_color(color1) xr = x + width contents.font.size = 15 if width < 96 draw_text(xr - 40, y, 42, line_height, current, 2) else draw_text(xr - 92, y, 42, line_height, current, 2) change_color(color2) draw_text(xr - 52, y, 12, line_height, "/", 2) draw_text(xr - 42, y, 42, line_height, max, 2) end contents.font.size = Font.default_size endend
#============================================================================== # F01 - 细节美化 - By芙蕾娅 #------------------------------------------------------------------------------ # ★ - 新增 ☆ - 修改 ■ - 删除 ● - 无变更 #============================================================================== module Freya # 值槽的种类 # 0 = 默认 # 1 = 描绘边框 # 2 = 渐变 # 3 = 描绘边框 + 渐变 Gauge_Type = 3 end #============================================================================== # ■ Window_Base #------------------------------------------------------------------------------ # 游戏中所有窗口的父类 #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # ☆ 放大字体尺寸 # 放大字体尺寸从8更改为4 #-------------------------------------------------------------------------- def make_font_bigger contents.font.size += 4 if contents.font.size <= 64 end #-------------------------------------------------------------------------- # ☆ 缩小字体尺寸 # 缩小字体尺寸从8更改为4 #-------------------------------------------------------------------------- def make_font_smaller contents.font.size -= 4 if contents.font.size >= 16 end #-------------------------------------------------------------------------- # ☆ 绘制值槽 # rate : 比率(1.0 为满值) # color1 : 渐变色的左端 # color2 : 渐变色的右端 # 增加了绘制种类 #-------------------------------------------------------------------------- def draw_gauge(x, y, width, rate, color1, color2) if Freya::Gauge_Type == 0 fill_w = (width * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, gauge_back_color) contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2) elsif Freya::Gauge_Type == 1 fill_w = ((width - 2) * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, gauge_back_color) contents.gradient_fill_rect(x + 1, gauge_y + 1, fill_w, 4, color1, color2) elsif Freya::Gauge_Type == 2 fill_w = ((width) * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, gauge_back_color) contents.gradient_fill_rect(x, gauge_y, fill_w / 2, 6, color1, color2) contents.gradient_fill_rect(x + fill_w / 2, gauge_y, fill_w / 2, 6, color2, color1) elsif Freya::Gauge_Type == 3 fill_w = ((width - 2) * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, gauge_back_color) contents.gradient_fill_rect(x + 1, gauge_y + 1, fill_w / 2, 4, color1, color2) contents.gradient_fill_rect(x + 1 + fill_w / 2, gauge_y + 1, fill_w / 2, 4, color2, color1) end end #-------------------------------------------------------------------------- # ☆ 以 当前值/最大值 这样的分数形式绘制当前值和最大值 # current : 当前值 # max : 最大值 # color1 : 当前值的颜色 # color2 : 最大值的颜色 # 稍微缩小字体大小,移动一些坐标 #-------------------------------------------------------------------------- def draw_current_and_max_values(x, y, width, current, max, color1, color2) change_color(color1) xr = x + width contents.font.size = 15 if width < 96 draw_text(xr - 40, y, 42, line_height, current, 2) else draw_text(xr - 92, y, 42, line_height, current, 2) change_color(color2) draw_text(xr - 52, y, 12, line_height, "/", 2) draw_text(xr - 42, y, 42, line_height, max, 2) end contents.font.size = Font.default_size end end
查看全部评分
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-16 00:47
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.