PIXI Controls: Fix startup in first time
This commit is contained in:
parent
c39ec970f1
commit
bdd4aa7762
1 changed files with 28 additions and 24 deletions
|
@ -514,6 +514,7 @@ ConfigManager.makeData = function () {
|
|||
var _ConfigManager_applyData = ConfigManager.applyData;
|
||||
ConfigManager.applyData = function (config) {
|
||||
_ConfigManager_applyData.apply(this, arguments);
|
||||
try {
|
||||
this.ONSConfig = config.ONSConfig;
|
||||
this.ONSConfig.controlsOffsetX = config.ONSConfig.controlsOffsetX;
|
||||
this.ONSConfig.controlsOffsetY = config.ONSConfig.controlsOffsetY;
|
||||
|
@ -538,6 +539,9 @@ ConfigManager.applyData = function (config) {
|
|||
this.ONSConfig.additonalSize = config.ONSConfig.additonalSize;
|
||||
this.ONSConfig.showX = config.ONSConfig.showX;
|
||||
this.ONSConfig.showY = config.ONSConfig.showY;
|
||||
} catch {
|
||||
console.log("ONSControls loaded in first time, skip config reading.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue