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

Project1

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

[已经解决] 求个TP显示改良脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
190 小时
注册时间
2011-2-19
帖子
147
跳转到指定楼层
1
 楼主| 发表于 2013-2-1 16:16:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 空の翼 于 2013-2-1 19:46 编辑

在菜单人物状态中显示TP
RUBY 代码复制
  1. class Window_Base
  2.   #--------------------------------------------------------------------------
  3.   # ● 绘制简单的状态
  4.   #--------------------------------------------------------------------------
  5.   def draw_actor_simple_status(actor, x, y)
  6.     draw_actor_name(actor, x, y)
  7.     draw_actor_level(actor, x, y + line_height * 1)
  8.     draw_actor_icons(actor, x, y + line_height * 2)
  9.     draw_actor_class(actor, x + 120, y - line_height * 0.5)
  10.     draw_actor_hp(actor, x + 120, y + line_height * 0.5) #绘制HP,在原有位置上略调整
  11.     draw_actor_mp(actor, x + 120, y + line_height * 1.5) #绘制MP,在原有位置上略调整
  12.     draw_actor_tp(actor, x + 120, y + line_height * 2.5)  #绘制TP
  13.   end
  14. end

想请大大们帮忙改改这个简单的TP绘制。
需要是在如果没有附加TP保留的特征时候,TP条变成:no reserve 之类的文字

Lv2.观梦者 (暗夜天使)

梦石
0
星屑
266
在线时间
2355 小时
注册时间
2009-3-13
帖子
2309

贵宾

2
发表于 2013-2-1 18:00:54 | 只看该作者
  1. class Window_Base
  2.   def draw_actor_simple_status(actor, x, y)
  3.     draw_actor_name(actor, x, y)
  4.     draw_actor_level(actor, x, y + line_height * 1)
  5.     draw_actor_icons(actor, x, y + line_height * 2)
  6.     draw_actor_class(actor, x + 120, y - line_height * 0.5)
  7.     draw_actor_hp(actor, x + 120, y + line_height * 0.5) #绘制HP,在原有位置上略调整
  8.     draw_actor_mp(actor, x + 120, y + line_height * 1.5) #绘制MP,在原有位置上略调整
  9.     if actor.preserve_tp?
  10.       draw_actor_tp(actor, x + 120, y + line_height * 2.5)  #绘制TP
  11.     else
  12.       draw_no_reserve(actor, x + 120, y + line_height * 2.5)
  13.     end
  14.   end
  15.   def draw_no_reserve(actor, x, y, width = 112)
  16.     draw_text(x, y, width, line_height, "no reserve") # 修改显示文字
  17.   end
  18. end
复制代码

点评

嗯,可以了。非常感谢XD  发表于 2013-2-1 19:38
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-16 20:10

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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