bitmap = RPG::Cache.windowskin"你的图片名") cw = bitmap.width ch = bitmap.height n = HP现在值 <= 0 ? 1 : HP现在值.to_f / HP最大值 src_rect = Rect.new(0, 0 , cw * n, ch) self.contents.blt(0,0, bitmap, src_rect)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |