afterloaddata
This commit is contained in:
parent
4a35ec6ebf
commit
b71806b167
@ -1513,7 +1513,7 @@ core.insertAction([
|
|||||||
|
|
||||||
而在我们的存档中,是不会对怪物数据进行存储的,只会存各个变量和Flag,因此我们需要在读档后根据变量或Flag来调整怪物数据。
|
而在我们的存档中,是不会对怪物数据进行存储的,只会存各个变量和Flag,因此我们需要在读档后根据变量或Flag来调整怪物数据。
|
||||||
|
|
||||||
我们可以在functions.js中的`afterLoadData`进行处理。
|
我们可以在脚本编辑中的`afterLoadData`进行处理。
|
||||||
|
|
||||||
``` js
|
``` js
|
||||||
////// 读档事件后,载入事件前,可以执行的操作 //////
|
////// 读档事件后,载入事件前,可以执行的操作 //////
|
||||||
|
|||||||
10
libs/core.js
10
libs/core.js
@ -889,6 +889,16 @@ core.prototype.debug = function() {
|
|||||||
core.control.debug();
|
core.control.debug();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////// 存档前 //////
|
||||||
|
core.prototype.beforeSaveData = function (data) {
|
||||||
|
return core.events.beforeSaveData(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
////// 读档后 //////
|
||||||
|
core.prototype.afterLoadData = function (data) {
|
||||||
|
return core.events.afterLoadData(data);
|
||||||
|
}
|
||||||
|
|
||||||
////// 重置当前地图 //////
|
////// 重置当前地图 //////
|
||||||
core.prototype.resetMap = function(floorId) {
|
core.prototype.resetMap = function(floorId) {
|
||||||
core.maps.resetMap(floorId);
|
core.maps.resetMap(floorId);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user