赞 | 1 |
VIP | 10 |
好人卡 | 2 |
积分 | 1 |
经验 | 132388 |
最后登录 | 2016-5-9 |
在线时间 | 34 小时 |
Lv1.梦旅人 冰王子
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 34 小时
- 注册时间
- 2008-1-27
- 帖子
- 1875
|
- alias HP draw_actor_hp
- HP(actor,x,y)
- def draw_actor_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/HP2")
- w1 = @bitmap2.width * actor.hp/actor.maxsp
- @src_rect2 = Rect.new(0, 0, w1, @bitmap2.height)
- self.contents.blt(x + 1, y + 1, @bitmap2, @src_rect2)
- end
- alias SP draw_actor_sp
- SP(actor,x,y)
- def draw_actor_sp(actor,x,y)
- @bitmap3 = Bitmap.new("Graphics/Pictures/SP1")
- @src_rect3 = Rect.new(0, 0, @bitmap3.width, @bitmap3.height, 100)
- self.contents.blt(x, y, @bitmap3, @src_rect3)
- @bitmap4 = Bitmap.new("Graphics/Pictures/SP2")
- w2 = @bitmap4.width * actor.hp/actor.maxsp
- @src_rect4 = Rect.new(0, 0, w2, @bitmap4.height)
- self.contents.blt(x + 1, y + 1, @bitmap4, @src_rect4)
- end
复制代码
试试吧 |
|