|
1819| 6
|
[有事请教] 请问如何在变量改变时自动为另一个变量赋值 |
|
悬赏10星屑已解决
最佳答案Game_Variables.prototype.setValue = function(variableId, value) {
if (variableId > 0 && variableId < $dataSystem.variables.length) {
if (typeof value === 'number') {
value = Math.floor(value);
}
this._data[variableId] = value;
if (variableId === 114) this._data[514] = value * 2 - 1; // 本行为新增内容
this.onChange();
} // 本行为 rpg_objec ...
| ||
|
比较健康
|
||
| ||
| ||
| ||
| ||
|
比较健康
|
||
点评
当然可以了,注意到onChange()是最后执行的啊~
| ||
|
比较健康
|
||