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

Project1

 找回密码
 注册会员
搜索
12
返回列表 发新帖
楼主: nasa123
打印 上一主题 下一主题

关于血槽加强版的问题

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-7-30
帖子
95
11
 楼主| 发表于 2008-7-30 06:13:54 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-7-30
帖子
95
12
 楼主| 发表于 2008-7-31 08:46:55 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
1 小时
注册时间
2008-5-18
帖子
251
13
发表于 2008-8-4 13:39:50 | 只看该作者
用这个
  1. class Game_Actor < Game_Battler
  2. def now_exp
  3.    return @exp - @exp_list[@level]
  4. end
  5. def next_exp
  6.    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  7. end
  8. end
  9. #==============================================================================
  10. # 描绘角色血条
  11. #==============================================================================
  12. class Window_BattleStatus < Window_Base
  13. #--------------------------------------------------------------------------
  14. # ● 初始化
  15. #--------------------------------------------------------------------------
  16. alias xrxs_bp2_refresh refresh
  17. def refresh
  18.   xrxs_bp2_refresh
  19.   @item_max = $game_party.actors.size
  20.   for i in 0...$game_party.actors.size
  21.     actor = $game_party.actors[i]
  22.     actor_x = actor.s_x - 455
  23.     actor_y = actor.s_y - 270
  24.     x1=self.x
  25.     y1=self.y
  26.     if actor.xiaoshi == nil and actor.dead? == false
  27.      draw_actor_hp_meter(actor, actor_x, 1+actor_y,35)
  28.      draw_actor_sp_meter(actor, actor_x, 10+actor_y, 35)
  29.     end
  30.   end
  31. end
  32. end
  33. #==============================================================================
  34. # ■ Window_Base
  35. #==============================================================================
  36. class Window_Base < Window
  37. #--------------------------------------------------------------------------
  38. # ● HP描画
  39. #--------------------------------------------------------------------------
  40. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  41.   if type == 1 and actor.hp == 0
  42.     return
  43.   end
  44.   self.contents.fill_rect(x-1, y+82, width+2,6, Color.new(0, 0, 0, 255))
  45.   w = width * actor.hp / [actor.maxhp,1].max
  46.   self.contents.fill_rect(x, y+84, w,1, Color.new(255, 140, 140, 255))
  47.   self.contents.fill_rect(x, y+85, w,1, Color.new(180, 18, 0, 255))
  48.   self.contents.fill_rect(x, y+86, w,1, Color.new(209, 33, 0,255))
  49. self.contents.fill_rect(x, y+87, w,1, Color.new(180, 18, 0, 255))
  50. end
  51. #--------------------------------------------------------------------------
  52. # ● SP描画
  53. #--------------------------------------------------------------------------
  54. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  55.   if type == 1 and actor.hp == 0
  56.     return
  57.   end
  58.   self.contents.fill_rect(x-1, y+82, width+2,6, Color.new(0, 0, 0, 255))
  59.   w = width * actor.sp / [actor.maxsp,1].max
  60.   self.contents.fill_rect(x, y+84, w,1, Color.new(40, 176, 255, 255))
  61.   self.contents.fill_rect(x, y+85, w,1, Color.new(78, 10, 175, 255))
  62.   self.contents.fill_rect(x, y+86, w,1, Color.new(94, 10, 214, 255))
  63.   self.contents.fill_rect(x, y+87, w,1, Color.new(78, 10, 175, 255))
  64. end
  65. #--------------------------------------------------------------------------
  66. # ● exp描画
  67. #--------------------------------------------------------------------------
  68. def draw_actor_exp_meter(actor, x, y, width = 156, type = 0)
  69. if type == 1 and actor.hp == 0
  70.    return
  71. end
  72. self.contents.fill_rect(x-1, y+83, width+2,6, Color.new(0, 0, 0, 255))
  73. w = width * actor.now_exp/[ actor.next_exp,1].max
  74. self.contents.fill_rect(x, y+83, w,1, Color.new(77, 140, 140, 255))
  75. self.contents.fill_rect(x, y+85, w,1, Color.new(100, 220, 220, 255))
  76. self.contents.fill_rect(x, y+86, w,1, Color.new(77, 173, 173, 255))
  77. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 207, 207, 255))
  78. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 173, 173, 255))
  79. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 140, 140, 255))
  80. end
  81. end
复制代码
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-8-14 03:11

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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