def draw_actor_hp1_bar(actor, x, y,height=60) bitmap3=Bitmap.new("Graphics/Pictures/xue4") w4 = 1.0 * actor.hp / actor.maxhp * height src_rect3 = Rect.new(0, 0, 60,w4) self.contents.blt(x+300, y, bitmap3, src_rect3) bitmap2=Bitmap.new("Graphics/Pictures/xue3") # 60 60 w3 = 1.0 * actor.hp / actor.maxhp * height src_rect2 = Rect.new(0, 0, 60,w3) self.contents.blt(x+200, y, bitmap2, src_rect2) bitmap1=Bitmap.new("Graphics/Pictures/xue2") w2 = 1.0 * actor.hp / actor.maxhp * height src_rect1 = Rect.new(0, 0, 60,w2) self.contents.blt(x+100, y, bitmap1, src_rect1) bitmap=Bitmap.new("Graphics/Pictures/xue1") # 60 60 w1 = 1.0 * actor.hp / actor.maxhp * height src_rect = Rect.new(0, 0, 60,w1) self.contents.blt(x, y, bitmap, src_rect) end
血槽图片.png (39.01 KB, 下载次数: 8)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |