Project1

标题: 如何让等级显示为小数 [打印本页]

作者: york0818    时间: 2020-8-19 21:21
标题: 如何让等级显示为小数
如原来的lv1显示为lv0.1,lv10显示为lv1.0。求大佬们支招
作者: alexncf125    时间: 2020-8-19 21:39
本帖最后由 alexncf125 于 2020-8-19 21:40 编辑
  1. class Window_Base < Window
  2.   #--------------------------------------------------------------------------
  3.   # ● 絵制等级
  4.   #--------------------------------------------------------------------------
  5.   def draw_actor_level(actor, x, y)
  6.     change_color(system_color)
  7.     draw_text(x, y, 32, line_height, Vocab::level_a)
  8.     change_color(normal_color)
  9.     a_lv = actor.level
  10.     a_lv = a_lv.to_f / 10
  11.     draw_text(x + 32, y, 24, line_height, a_lv, 2)
  12.   end
  13. end
复制代码

以上,插入脚本后你会发现字都挤成了一团,提示,需改兩个数值,自己想




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1