赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 22997 |
最后登录 | 2013-9-8 |
在线时间 | 4 小时 |
Lv1.梦旅人 传奇
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 4 小时
- 注册时间
- 2007-4-10
- 帖子
- 427
|
5楼

楼主 |
发表于 2008-1-20 04:24:50
|
只看该作者
def HP(actor,x,y)
@bitmap1 =Bitmap.new("Graphics/Pictures/HP1")
@src_rect1 = Rect.new(0, 0, @bitmap1.width, @bitmap1.height)
self.contents.blt(x, y, @bitmap1, @src_rect1)
@bitmap2 =Bitmap.new("Graphics/Pictures/HP")
w2 = @bitmap2.width * actor.hp/actor.maxhp
@src_rect2 = Rect.new(0, 0, w2, @bitmap2.height)
self.contents.blt(x, y, @bitmap2, @src_rect2)
end
def SP(actor,x,y)
@bitmap1 =Bitmap.new("Graphics/Pictures/SP2")
@src_rect1 = Rect.new(0, 0, @bitmap1.width, @bitmap1.height)
self.contents.blt(x, y, @bitmap1, @src_rect1)
@bitmap2 =Bitmap.new("Graphics/Pictures/SP")
w2 = @bitmap2.width * actor.sp/actor.maxsp
@src_rect2 = Rect.new(0, 0, w2, @bitmap2.height)
self.contents.blt(x, y, @bitmap2, @src_rect2)
end |
|