查看: 1950|回复: 1

[已经过期] 关于以前的一个血条脚本的问题。

[复制链接]
梦石
8
星屑
6443
在线时间
1029 小时
注册时间
2010-7-26
回帖
277
发表于 2011-1-27 22:45:45 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 quanhome 于 2011-1-27 23:40 编辑
  1. class Window_Base
  2.   def draw_actor_hp(actor, x, y)
  3.     back = Cache.system("Meter_Back")   
  4.     cw = back.width  
  5.     ch = back.height
  6.     src_rect = Rect.new(0, 0, cw, ch)   
  7.     self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  8.     meter = Cache.system("HP_Meter")   
  9.     cw = meter.width  * actor.hp / actor.maxhp
  10.     ch = meter.height
  11.     src_rect = Rect.new(0, 0, cw, ch)
  12.     self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  13.     text = Cache.system("HP_Text")   
  14.     cw = text.width  
  15.     ch = text.height
  16.     src_rect = Rect.new(0, 0, cw, ch)
  17.     self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  18.     self.contents.font.color = Color.new(255,255,255,255)
  19.     self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
  20.     self.contents.font.color = Color.new(255,255,255,255)
  21.     self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)   
  22.   end
  23.   def draw_actor_mp(actor, x, y)
  24.     back = Cache.system("Meter_Back")   
  25.     cw = back.width  
  26.     ch = back.height
  27.     src_rect = Rect.new(0, 0, cw, ch)   
  28.     self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  29.     meter = Cache.system("MP_Meter")   
  30.     cw = meter.width  * actor.mp / actor.maxmp
  31.     ch = meter.height
  32.     src_rect = Rect.new(0, 0, cw, ch)
  33.     self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  34.     text = Cache.system("MP_Text")   
  35.     cw = text.width  
  36.     ch = text.height
  37.     src_rect = Rect.new(0, 0, cw, ch)
  38.     self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  39.     self.contents.font.color = Color.new(255,255,255,255)
  40.     self.contents.draw_text(x + 81, y - 1, 48, 32, actor.mp.to_s, 2)
  41.     self.contents.font.color = Color.new(255,255,255,255)
  42.     self.contents.draw_text(x + 80, y - 2, 48, 32, actor.mp.to_s, 2)   
  43.   end
  44. end
复制代码
脚 本中的一些错误已经找到一些,,,。但是  这个脚本加上以后   就没有  max hp  了     如 原来是  hp:  430/430  现在只有  hp: 430。。。。请教下 如何变回  有 max hp 那种样式。。。。


《尘沙的选择》2D动作射击剧情解谜末世题材独立游戏
STEAM地址
《午餐13:血肉机器 》全新故事线版本
STEAM连接
梦石
0
星屑
155
在线时间
116 小时
注册时间
2011-1-23
回帖
101
发表于 2011-1-29 17:14:10 | 显示全部楼层
??????????????????????????:dizzy:
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部