赞 | 17 |
VIP | 0 |
好人卡 | 0 |
积分 | 34 |
经验 | 0 |
最后登录 | 2025-4-1 |
在线时间 | 153 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3421
- 在线时间
- 153 小时
- 注册时间
- 2018-1-22
- 帖子
- 146
|
如果你的图片被定义为Scene_Menu类里的某个Sprite对象,可以调用setFrame()方法 并访问_statusWindow的角色属性
- // 假设图片已创建为sprite,且正确加入到场景容器中
- var _Temp_Scene_Menu_start = Scene_Menu.prototype.start;
- Scene_Menu.prototype.start = function() {
- _Temp_Scene_Menu_start.call(this);
-
- spriteObject.setFrame(0, 0, spriteObject.width * this._statusWindow.actor(0).hpRate(), spriteObject.height); // x, y, width, height => width绑定第1位人物的HP比例
- };
复制代码 |
|