76 lines
1.9 KiB
JavaScript
76 lines
1.9 KiB
JavaScript
|
|
"use strict";
|
||
|
|
cc._RF.push(module, '2be84/ZrctDUITgQ3aSmKGX', 'cmp.sync.joined.show');
|
||
|
|
// Scripts/mod/home/sync_center/cmp.sync.joined.show.js
|
||
|
|
|
||
|
|
"use strict";
|
||
|
|
|
||
|
|
/******************************************************************
|
||
|
|
*
|
||
|
|
* 同步完成弹窗
|
||
|
|
*
|
||
|
|
******************************************************************/
|
||
|
|
|
||
|
|
var BridgeWindow = require("bridge.window");
|
||
|
|
var FxSpine = require("nx.fx.spine");
|
||
|
|
var CmpItem = require("cmp.item.inbag");
|
||
|
|
cc.Class({
|
||
|
|
"extends": BridgeWindow,
|
||
|
|
properties: {
|
||
|
|
spAnim: {
|
||
|
|
"default": null,
|
||
|
|
type: FxSpine
|
||
|
|
},
|
||
|
|
cmpItem: {
|
||
|
|
"default": null,
|
||
|
|
type: CmpItem
|
||
|
|
},
|
||
|
|
nodLevel: {
|
||
|
|
"default": null,
|
||
|
|
type: cc.Node
|
||
|
|
}
|
||
|
|
},
|
||
|
|
// 重载:参数打开
|
||
|
|
onOpenConfigs: function onOpenConfigs(_params) {
|
||
|
|
this.partner = _params;
|
||
|
|
var tf = nx.text.format("LvNumber", this.partner.resonate_lev);
|
||
|
|
var tt = nx.text.format("LvNumber", this.partner.lev);
|
||
|
|
|
||
|
|
// 等级信息
|
||
|
|
nx.gui.setString(this.nodLevel, "from", tf);
|
||
|
|
nx.gui.setString(this.nodLevel, "to", tt);
|
||
|
|
|
||
|
|
// 目标伙伴
|
||
|
|
this.cmpItem.setData(this.partner);
|
||
|
|
|
||
|
|
// 第一阶段
|
||
|
|
this.doStep1();
|
||
|
|
},
|
||
|
|
// 第一阶段
|
||
|
|
doStep1: function doStep1() {
|
||
|
|
var _this = this;
|
||
|
|
nx.gui.setActive(this, "panel/touch", false);
|
||
|
|
nx.gui.setOpacity(this, "panel/infos", 0);
|
||
|
|
this.spAnim.action("action", false, function (_key, _name) {
|
||
|
|
console.log(_key, _name);
|
||
|
|
if (_key == "reward") {
|
||
|
|
nx.tween.fadeIn(_this, "panel/infos", 0.3);
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if (_key == "complete") {
|
||
|
|
_this.doStep2();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
},
|
||
|
|
// 第二阶段
|
||
|
|
doStep2: function doStep2() {
|
||
|
|
var _this2 = this;
|
||
|
|
this.spAnim.action("action2", true);
|
||
|
|
this.scheduleOnce(function () {
|
||
|
|
var node = nx.gui.setActive(_this2, "panel/touch", true);
|
||
|
|
nx.tween.fadeIn(node, "", 0.5);
|
||
|
|
}, 0.5);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
cc._RF.pop();
|