赞 | 203 |
VIP | 13 |
好人卡 | 7 |
积分 | 122 |
经验 | 52899 |
最后登录 | 2021-6-29 |
在线时间 | 4435 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 12157
- 在线时间
- 4435 小时
- 注册时间
- 2014-4-11
- 帖子
- 5955
|
你既然可以获得this._actor这个角色参数。那么就直接使用this._actor就可以了。
赋值的时候就是this._actor这个角色后面点多少=多少,就是了。
this._actor._bianliang = 1
那么这个角色的_bianliang 这个变量,就是1了
那么你在显示的时候显示这个角色的this._actor._bianliang,那就是显示1
显示能力值不都是这样使用的吗。
你要是用在事件左上角,那用事件的$gameSwitches.value和$gameVariables.value是很方便。
//=====================机械王座==============================================
if (this._actor._kaiguan){//条件变量
// this.drawIcon( 3, x + 350, y, 60, 'right');//图标显示
this.changeTextColor('rgba(0,255,0,255)');
this.drawText("机械王座:", x + 800, y +130, 100, 'right');//文字显示
this.changeTextColor('rgba(255,0,0,255)');
this.drawText( + this._actor._bianliang +"%净化率", x + 850, y +130, 200, 'right'); //变量显示
} else{
this.changeTextColor('rgba(0,255,0,255)');
this.drawText("机械王座:", x + 800, y +130, 100, 'right');
// this.drawText("之塔:", x + 680, y -20, 100, 'right');
this.changeTextColor('rgba(255,0,0,255)');
this.drawText("关闭", x + 850, y +130, 100, 'right');
};
//============================================================================= |
|