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

Project1

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

[已经过期] VA 如何在菜单里显示经验条

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
12 小时
注册时间
2012-11-16
帖子
6
跳转到指定楼层
1
发表于 2012-11-18 15:59:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
VA 如何在菜单里显示经验条

Lv1.梦旅人

梦石
0
星屑
50
在线时间
283 小时
注册时间
2012-10-13
帖子
56
2
发表于 2012-11-18 17:00:48 | 只看该作者
http://rpg.blue/thread-253962-1-1.html
你不是在這帖問過了嗎
也有人回答你了
為什麼還要再開一帖呢
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
164 小时
注册时间
2011-8-15
帖子
238
3
发表于 2012-11-23 18:49:25 | 只看该作者
直接上脚本了= =||,话说...为什么不自己去找呢...?很容易找到啊...
  1. #===================================
  2. #  ●設定區域
  3. #===================================

  4. module WD
  5. module Exp_Gauge
  6.   #EXP條COLOR,請修改成TEXT文字
  7.   EXP_GAUGE_COLOR1 = 6
  8.   EXP_GAUGE_COLOR2 = 14

  9.   #EXP條文字顯示設定,true為打開,false為關閉
  10.   EXP_TEXT_DISPLAY = true
  11. end
  12. end

  13. #==============================================================================
  14. # ■ Window_Base
  15. #------------------------------------------------------------------------------
  16. #  ゲーム中の全てのウィンドウのスーパークラスです。
  17. #==============================================================================

  18. class Window_Base < Window
  19.   include WD::Exp_Gauge

  20.   def exp_gauge_color1;   text_color(EXP_GAUGE_COLOR1);  end;    # EXP ゲージ 1
  21.   def exp_gauge_color2;   text_color(EXP_GAUGE_COLOR2);  end;    # EXP ゲージ 2

  22.   #--------------------------------------------------------------------------
  23.   # ● シンプルなステータスの描画
  24.   #--------------------------------------------------------------------------
  25.   def draw_actor_simple_status(actor, x, y)
  26.     draw_actor_name(actor, x, y + line_height * 0.5)
  27.     draw_actor_level(actor, x, y - line_height * 0.5)
  28.     draw_actor_icons(actor, x, y + line_height * 1.5)
  29.     draw_actor_class(actor, x + 120, y - line_height * 0.5)
  30.     draw_actor_hp(actor, x + 120, y + line_height * 0.5)
  31.     draw_actor_mp(actor, x + 120, y + line_height * 1.5)
  32.     draw_actor_exp(actor, x, y + line_height * 2.5, EXP_TEXT_DISPLAY)
  33.   end
  34.   #--------------------------------------------------------------------------
  35.   # ● EXP の描画
  36.   #--------------------------------------------------------------------------
  37.   def draw_actor_exp(actor, x, y, display = true, width = 244)
  38.     this_level = actor.exp - actor.past_level_exp
  39.     next_level = actor.next_level_exp - actor.past_level_exp
  40.     draw_gauge(x, y, width, actor.exp_rate, exp_gauge_color1, exp_gauge_color2)
  41.     change_color(system_color)
  42.     if display
  43.       draw_text(x, y, 30, line_height, "EXP")
  44.       draw_current_and_max_values(x, y, width, this_level, next_level, mp_color(actor), normal_color)
  45.     end
  46.   end
  47. end

  48. class Game_Actor < Game_Battler
  49.   #--------------------------------------------------------------------------
  50.   # ● EXP の割合を取得
  51.   #--------------------------------------------------------------------------
  52.   def exp_rate
  53.     this_level = exp - past_level_exp
  54.     next_level = next_level_exp - past_level_exp
  55.     next_level > 0 ? this_level.to_f / next_level : 0
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● 前のレベルの経験値を取得
  59.   #--------------------------------------------------------------------------
  60.   def past_level_exp
  61.     [url=home.php?mod=space&uid=22147]@level[/url] > 1 ? exp_for_level(@level - 1) : 0
  62.   end
  63. end
复制代码
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-9 09:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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