| 赞 | 0 |
| VIP | 0 |
| 好人卡 | 0 |
| 积分 | 1 |
| 经验 | 1160 |
| 最后登录 | 2017-6-18 |
| 在线时间 | 16 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 16 小时
- 注册时间
- 2007-7-7
- 帖子
- 44
|
4楼

楼主 |
发表于 2007-8-20 06:20:16
|
只看该作者
- class Scene_Tp < Window_Base
- def initialize
- super(-15, -15, 500, 500)
- self.opacity=0
- self.back_opacity=0
- self.contents_opacity=255
- self.contents = Bitmap.new(width - 32, height - 32)
- $actor = $game_party.actors[0]
- refresh
- end
- def refresh
- self.contents.clear
- @bitmap1 = Bitmap.new("Graphics/Pictures/背景")
- @cw1 = @bitmap1.width
- @ch1 = @bitmap1.height
- @rect1 = Rect.new(0,0,600,600)
- self.contents.blt(0,0,@bitmap1,@rect1)
- @bitmap2 = Bitmap.new("Graphics/Pictures/头像")
- @cw2 = @bitmap2.width
- @ch2 = @bitmap2.height
- @rect2 = Rect.new(0,0,@cw2,@ch2)
- self.contents.blt(9,10,@bitmap2,@rect2)
- @bitmap3 = Bitmap.new("Graphics/Pictures/血")
- @cw3 = @bitmap3.width * $actor.hp/$actor.maxhp
- @ch3 = @bitmap3.height+3
- @rect3 = Rect.new(0,0,@cw3,@ch3)
- self.contents.blt(93,21,@bitmap3,@rect3)
- @bitmap4 = Bitmap.new("Graphics/Pictures/气")
- @cw4 = @bitmap4.width * $actor.sp/$actor.maxsp
- @ch4 = @bitmap4.height+10
- @rect4 = Rect.new(0,0,@cw4,@ch4)
- self.contents.blt(93,47,@bitmap4,@rect4)
- self.contents.font.color = normal_color
- self.contents.draw_text(48+90, 10, 12, 32, "/", 1)
- self.contents.draw_text(60+90, 10, 48, 32, $actor.maxhp.to_s)
- self.contents.font.color = normal_color
- self.contents.draw_text(48+90, 35, 12, 32, "/", 1)
- self.contents.draw_text(60+90, 35, 48, 32, $actor.maxsp.to_s)
- draw_actor_hp($actor, 20, 10, 120)
- draw_actor_sp($actor, 20, 35, 120)
- end
- end
复制代码 |
|