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

Project1

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

菜单中绘制TP

[复制链接]

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

跳转到指定楼层
1
发表于 2014-5-21 15:58:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 taroxd 于 2014-12-26 16:11 编辑

使用方法:为角色增加「特技专注」属性,或在设置常量脚本中的PRESERVE_TP常量设为true,即可自动在菜单上绘制TP

RUBY 代码复制
  1. #--------------------------------------------------------------------------
  2. # ● require Taroxd基础设置
  3. #--------------------------------------------------------------------------
  4. class Window_Base < Window
  5.   #--------------------------------------------------------------------------
  6.   # ● 绘制简单的状态
  7.   #--------------------------------------------------------------------------
  8.   def_chain :draw_actor_simple_status do |old, actor, x, y|
  9.     if actor.preserve_tp?
  10.       draw_actor_name(actor, x, y)
  11.       draw_actor_level(actor, x, y + line_height)
  12.       draw_actor_icons(actor, x, y + line_height * 2)
  13.       draw_actor_class(actor, x + 120, y)
  14.       draw_actor_hp(actor, x + 120, y + line_height)
  15.       draw_actor_mp(actor, x + 120, y + line_height * 2, 60)
  16.       draw_actor_tp(actor, x + 184, y + line_height * 2, 60)
  17.     else
  18.       old.(actor, x, y)
  19.     end
  20.   end
  21. end
  22.  
  23. class Window_Status < Window_Selectable
  24.   #--------------------------------------------------------------------------
  25.   # ● 绘制基本信息
  26.   #--------------------------------------------------------------------------
  27.   def_chain :draw_basic_info do |old, x, y|
  28.     if @actor.preserve_tp?
  29.       draw_actor_level(@actor, x, y)
  30.       draw_actor_icons(@actor, x, y + line_height)
  31.       draw_actor_hp(@actor, x, y + line_height * 2)
  32.       draw_actor_mp(@actor, x, y + line_height * 3, 60)
  33.       draw_actor_tp(@actor, x + 64, y + line_height * 3, 60)
  34.     else
  35.       old.(x, y)
  36.     end
  37.   end
  38. end
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-5-22 10:10

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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