赞 | 1 |
VIP | 74 |
好人卡 | 1 |
积分 | 522 |
经验 | 25708 |
最后登录 | 2017-11-24 |
在线时间 | 269 小时 |
Lv6.析梦学徒
- 梦石
- 0
- 星屑
- 52156
- 在线时间
- 269 小时
- 注册时间
- 2010-6-16
- 帖子
- 982
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
似乎找不到范例和脚本,来求教一下…
def draw_actor_hp(actor, x, y, width = 124)
hp_percent = 1.0 * actor.hp / actor.mhp
@hpp_1 = Sprite.new
@hpp_1.bitmap = Bitmap.new("Graphics/draw/hp_1.png")
@hpp_1.x = x
@hpp_1.y = y
@hpp_2 = Sprite.new
@hpp_2.bitmap = Bitmap.new("Graphics/draw/hp_2.png")
@hpp_2.src_rect.set(x , y, hp_percent * @hpp_2.bitmap.width, @hpp_2.bitmap.height)
@hpp_2.x = x
@hpp_2.y= y
draw_text(x, y, 30, line_height, Vocab::hp_a)
draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
hp_color(actor), normal_color)
end
这样似乎是不对的,需要刷新还是?调用后发现坐标不对,也没法实时刷新 |
|