赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 13512 |
最后登录 | 2022-5-16 |
在线时间 | 140 小时 |
Lv1.梦旅人 茄孓
- 梦石
- 0
- 星屑
- 72
- 在线时间
- 140 小时
- 注册时间
- 2007-5-29
- 帖子
- 956
|
修改如下
class Window_Help < Window_Base
def set_enemy(actor)
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
carol3_draw_hp_bar(actor, 284, 0)
carol3_draw_sp_bar(actor, 460, 0)
@text = nil
self.visible = true
end
def carol3_draw_hp_bar(actor, x, y, width = 128) #宽度可调
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255))
w = width * actor.hp / actor.maxhp
self.contents.fill_rect(x, y+18, w,1, Color.new(255, 96, 96, 255))
self.contents.fill_rect(x, y+19, w,1, Color.new(255, 0, 0, 255))
self.contents.fill_rect(x, y+20, w,1, Color.new(128, 0, 0, 255))
self.contents.fill_rect(x, y+21, w,1, Color.new(0, 0, 0, 255))
self.contents.font.color = normal_color
self.contents.draw_text(x-40-10,y,128,32,$data_system.words.hp,1)
self.contents.draw_text(x-50-10,y,128,32,actor.hp.to_s,2)
self.contents.draw_text(x-30-10,y,128,32,"/",2)
self.contents.draw_text(x+10-10,y,128,32,actor.maxhp.to_s,2)
self.contents.font.color = normal_color
end
def carol3_draw_sp_bar(actor, x, y, width = 128)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255))
w = width * actor.sp / actor.maxsp
self.contents.fill_rect(x, y+18, w,1, Color.new(128, 255, 255, 255))
self.contents.fill_rect(x, y+19, w,1, Color.new(0, 255, 255, 255))
self.contents.fill_rect(x, y+20, w,1, Color.new(0, 192, 192, 255))
self.contents.fill_rect(x, y+21, w,1, Color.new(0, 128, 128, 255))
self.contents.font.color = normal_color
self.contents.draw_text(x-40-10,y,128,32,$data_system.words.sp,1)
self.contents.draw_text(x-50-10,y,128,32,actor.sp.to_s,2)
self.contents.draw_text(x-30-10,y,128,32,"/",2)
self.contents.draw_text(x+10-10,y,128,32,actor.maxsp.to_s,2)
self.contents.font.color = normal_color
end
end
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|