赞 | 2 |
VIP | 335 |
好人卡 | 3 |
积分 | 1 |
经验 | 14077 |
最后登录 | 2020-1-28 |
在线时间 | 264 小时 |
Lv1.梦旅人 冰
- 梦石
- 0
- 星屑
- 142
- 在线时间
- 264 小时
- 注册时间
- 2006-11-22
- 帖子
- 1057
|
- #--------------------------------------------------------------------------
- # ★ 描绘 EXP 矩形 by 小翼 [FDU]alwing
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def EXP(actor,x,y,width = 128)
- self.contents.fill_rect(x+26, y+60, width+4,9, Color.new(0,0,0,255))
- self.contents.fill_rect(x+27, y+61, width+2,7, Color.new(255,255,255,255))
- self.contents.fill_rect(x+28, y+62, width,5, Color.new(0,0,0,255))
- if actor.next_exp > 0
- @EXPw = width * actor.now_exp/actor.next_exp
- self.contents.fill_rect(x+28, y+62, @EXPw,1, Color.new(100,50,150,255))
- self.contents.fill_rect(x+28, y+63, @EXPw,1, Color.new(150,100,200,255))
- self.contents.fill_rect(x+28, y+64, @EXPw,1, Color.new(200,150,255,255))
- self.contents.fill_rect(x+28, y+65, @EXPw,1, Color.new(150,100,200,255))
- self.contents.fill_rect(x+28, y+66, @EXPw,1, Color.new(100,50,150,255))
- else
- self.contents.fill_rect(x+28, y+62, width,1, Color.new(50,150,150,255))
- self.contents.fill_rect(x+28, y+63, width,1, Color.new(100,200,200,255))
- self.contents.fill_rect(x+28, y+64, width,1, Color.new(150,255,255,255))
- self.contents.fill_rect(x+28, y+65, width,1, Color.new(100,200,200,255))
- self.contents.fill_rect(x+28, y+66, width,1, Color.new(50,150,150,255))
- end
- end
复制代码 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|