赞 | 0 |
VIP | 157 |
好人卡 | 6 |
积分 | 1 |
经验 | 113829 |
最后登录 | 2014-1-16 |
在线时间 | 26 小时 |
Lv1.梦旅人 B
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 26 小时
- 注册时间
- 2007-8-26
- 帖子
- 3693
|
<<_END_
☆图片SP、HP的描画 V1.5
by 逐月
_END_
#描画HP槽
def HP (actor,x,y)
@bitmap3 = Bitmap.new("Graphics/Pictures/血槽/底")
@src_rect3 = Rect.new(0,0,@bitmap3.width, @bitmap3.height)
self.contents.blt(x,y, @bitmap3, @src_rect3)
#HP显示
@bitmap3 = Bitmap.new("Graphics/Pictures/血槽/hp")
w3 = @bitmap3.width * actor.hp/actor.maxhp
@src_rect3 = Rect.new(0,0,w3, @bitmap3.height)
self.contents.blt(x+4,y+2, @bitmap3, @src_rect3)
end
#描画SP槽
def SP (actor,x,y)
@bitmap1 = Bitmap.new("Graphics/Pictures/血槽/底")
@src_rect1 = Rect.new(0,0,@bitmap1.width, @bitmap1.height)
self.contents.blt(x,y, @bitmap1, @src_rect1)
#SP显示
@bitmap1 = Bitmap.new("Graphics/Pictures/血槽/sp")
w1 = @bitmap1.width * actor.sp/actor.maxsp
@src_rect1 = Rect.new(0,0,w1, @bitmap1.height)
self.contents.blt(x+4,y+2, @bitmap1, @src_rect1)
end
#描画exp槽
def exp (actor,x,y)
@bitmap4 = Bitmap.new("Graphics/Pictures/血槽/底")
@src_rect4 = Rect.new(0,0,@bitmap4.width, @bitmap4.height)
self.contents.blt(x,y, @bitmap4, @src_rect4)
#exp显示
@bitmap4 = Bitmap.new("Graphics/Pictures/血槽/exp")
w4 = @bitmap4.width * actor.exp/actor.next_exp
@src_rect4 = Rect.new(0,0,w4, @bitmap4.height)
self.contents.blt(x+4,y+2, @bitmap4, @src_rect4)
end 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|