设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1973|回复: 1
打印 上一主题 下一主题

[已经解决] 如何将经验图形化?

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
108 小时
注册时间
2010-8-16
帖子
57
跳转到指定楼层
1
发表于 2011-9-27 23:39:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
就想标题所说的,
当前经验xxx,还有xxx可升级真的好单调。。。
怎么修改成图形(血条)的样子呢?
谢谢!

Lv1.梦旅人

梦石
0
星屑
48
在线时间
678 小时
注册时间
2010-8-11
帖子
1533
2
发表于 2011-9-28 00:24:51 | 只看该作者
  1. module XRXSVDsIn3
  2.   Width  = 80
  3.   Height =  9
  4.   Color1 = 20
  5.   Color2 = 21
  6. end
  7. class Game_System
  8.   attr_accessor :wide_screen
  9. end
  10. class Window_Base < Window
  11.   def draw_actor_level(actor, x, y)
  12.     if draw_exp_gauge_scene?
  13.       w = XRXSVDsIn3::Width * ($game_system.wide_screen ? 3 : 4) / 4
  14.       draw_actor_exp_gauge(actor, x, y, w)
  15.     else
  16.       w = 24
  17.     end
  18.     self.contents.font.color = system_color
  19.     self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
  20.     self.contents.font.color = normal_color
  21.     self.contents.draw_text(x + 32, y, w - 32, WLH, actor.level, 2)
  22.   end
  23.   def draw_exp_gauge_scene?
  24.     return [Scene_Menu, Scene_Item, Scene_Skill, Scene_Equip].include?($scene.class)
  25.   end
  26.   def draw_actor_exp_gauge(actor, x, y, width = 120)
  27.     gw = width * actor.exp_percent / 100
  28.     gc1 = text_color(XRXSVDsIn3::Color1)
  29.     gc2 = text_color(XRXSVDsIn3::Color2)
  30.     h   = XRXSVDsIn3::Height
  31.     self.contents.fill_rect(x, y + WLH - h - 2, width, h, gauge_back_color)
  32.     self.contents.gradient_fill_rect(x, y + WLH - h - 2, gw, h, gc1, gc2)
  33.   end
  34. end
  35. class Game_Actor < Game_Battler
  36.   def exp_percent
  37.     need_next_level = @exp_list[self.level + 1] - @exp_list[self.level]
  38.     exp_now_level   = @exp - @exp_list[self.level]
  39.     return 100 * exp_now_level / need_next_level
  40.   end
  41. end
复制代码
于是,我昨天回答的帖子内容
出现了……囧

点评

MSQ
小艾出现了~~=W=~~好久不见~~  发表于 2011-10-11 16:56

评分

参与人数 1星屑 +10 收起 理由
MSQ + 10 欢迎欢迎~~=W=

查看全部评分

小艾工作室开张= =
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-3 12:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表