43 lines
1.4 KiB
JavaScript
43 lines
1.4 KiB
JavaScript
"use strict";
|
|
let fs = require("fs");
|
|
let path = require("path");
|
|
|
|
module.exports = {
|
|
load() {
|
|
this.init();
|
|
},
|
|
unload() {
|
|
// Editor.log("卸載執行");
|
|
},
|
|
/** 初始化 */
|
|
init() {
|
|
// this.createDirectory();
|
|
},
|
|
/** 創建Spine節點 */
|
|
SourceChange(...args) {
|
|
// Editor.log("文件0: " + JSON.stringify(args[0]));
|
|
// Editor.log("文件1: " + JSON.stringify(args[1]._value));
|
|
// Editor.log("文件2: " + JSON.stringify(args[2]._value));
|
|
Editor.Scene.callSceneScript("sourcechange", "get-asset-info", { args: args }, function (err, response) {
|
|
Editor.log("SourceChange: " + response);
|
|
});
|
|
},
|
|
messages: {
|
|
/** 打開面板 */
|
|
"open-panel"() {
|
|
Editor.Panel.open("sourcechange");
|
|
},
|
|
/** 保存按鈕點擊 */
|
|
"create-click"(event, ...args) {
|
|
this.SourceChange(...args);
|
|
},
|
|
// /** 面板加載完成 */
|
|
// "panel-load-finish"(evnet, ...args) {
|
|
// Editor.Scene.callSceneScript("sourcechange", "get-default-info", { args: args }, function (err, response) {
|
|
// // Editor.log("callSceneScript: " + response);
|
|
// Editor.Ipc.sendToPanel("sourcechange", "setDefault", response);
|
|
// });
|
|
// },
|
|
},
|
|
|
|
} |