<<_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
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |