| 赞 | 0  | 
 
| VIP | 12 | 
 
| 好人卡 | 0 | 
 
| 积分 | 1 | 
 
| 经验 | 3626 | 
 
| 最后登录 | 2020-5-5 | 
 
| 在线时间 | 1 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 60 
 
        - 在线时间
 - 1 小时
 
        - 注册时间
 - 2008-5-31
 
        - 帖子
 - 237
 
 
 
 | 
	
在 window_base里面有 draw_actor_hp_gauge 的方法-   def draw_actor_hp_gauge(actor, x, y, width = 120)
 
 -     gw = width * actor.hp / actor.maxhp
 
 -     gc1 = hp_gauge_color1
 
 -     gc2 = hp_gauge_color2
 
 -     self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
 
 -     self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
 
 -   end
 
  复制代码-     bitmap = Cache.at("EXP")
 
 -     rect = Rect.new(0, 0, 0, 0)
 
 -     rect.x = 0
 
 -     rect.y = 0
 
 -     rect.width = 160
 
 -     rect.height = 20
 
 -     self.contents.blt(x + 100, y + 80, bitmap, rect)
 
 -     bitmap.dispose
 
 -     bitmap = Cache.at("gauge")
 
 -     rate = actor.next_exp(actor.level, actor.exp)
 
 -     rate = rate *125 / 100
 
 -     rect = Rect.new(0, 0, 0, 0)
 
 -     rect.x = 0
 
 -     rect.y = 0
 
 -     rect.width = rate
 
 -     rect.height = 10
 
 -     self.contents.blt(x + 130, y + 87, bitmap, rect)
 
 -     bitmap.dispose
 
  复制代码 这是某之前写的经验值的,原理是贴两张图,一张是做衬底,一张是变长度的 做显示 
把,稍微改改基本ok。 
 
 
--------------------------------------------------------------------- 
关站前稍微混混。。 |   
 
 
 
 |