Project1

标题: 谁可以帮我改下经验槽 [打印本页]

作者: 逐月    时间: 2008-1-30 23:23
提示: 作者被禁止或删除 内容自动屏蔽
作者: ONEWateR    时间: 2008-1-31 00:11
<<_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
[LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: 逐月    时间: 2008-1-31 00:23
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1