| 赞 | 353 |
| VIP | |
| 好人卡 | |
| 积分 | 392 |
| 经验 | |
| 最后登录 | 2026-8-25 |
| 在线时间 | 11155 小时 |
- 梦石
- 0
- 星屑
- 39236
- 在线时间
- 11155 小时
- 注册时间
- 2009-3-15
- 回帖
- 4768
|
发表于 2022-12-20 12:26:14
|
显示全部楼层
本帖最后由 soulsaga 于 2022-12-22 12:18 编辑
[pre lang="ruby"]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)[/pre]
不要照抄..自行替换中文的部份 |
评分
-
查看全部评分
|