52 lines
2.2 KiB
TypeScript
52 lines
2.2 KiB
TypeScript
import FGUtil from "../gear_2.3.4/fgui/FGUtil";
|
|
import SKUIUtil from "../gear_2.3.4/util/SKUIUtil";
|
|
const { ccclass, property } = cc._decorator;
|
|
export default class Guide extends cc.Component {
|
|
|
|
/**
|
|
* 競技場單例實例
|
|
*/
|
|
public static Instance: Guide = null;
|
|
|
|
/**
|
|
* 競技場面板
|
|
*/
|
|
guidePanel: fgui.GComponent = null;
|
|
|
|
|
|
onLoad() {
|
|
if (Guide.Instance === null) {
|
|
Guide.Instance = this;
|
|
} else {
|
|
this.destroy();
|
|
return;
|
|
}
|
|
}
|
|
|
|
openGuidePanel() {
|
|
if (!this.guidePanel || (this.guidePanel && !this.guidePanel.node && !SKUIUtil.isValid(this.guidePanel.node))) {
|
|
this.guidePanel = FGUtil.create("main_ui", "newbee_main");
|
|
FGUtil.root().addChild(this.guidePanel);
|
|
this.guidePanel.makeFullScreen();
|
|
}
|
|
|
|
var content = FGUtil.getButton(this.guidePanel, "alert/n4/text");
|
|
content.text = "1. 上線自動獲得20萬仙玉啟動物資 稀有範式之魂一隻\n2. 活躍度做滿可獲得5萬玉 寶圖3張 寶圖可開一切\n3. 首衝30開通聊天 獲得110萬仙玉 稀有上古白虎一隻 前五百名額外贈送價值1000累計禮包\n4. 豐厚的升級獎勵 根據等級可領取 最高可以獲得數額仙玉 以及狐小妖\n5. 豐厚的簽到功能 以及補簽領取\n6. 增加每日充值 充值之後 可重置再次領取獎勵\n7. 幫派限制最高五個幫派 根據幫派人數可獲得價值1000充值額度\n8. 充值可獲得轉盤積分10元抽一次獎 豐厚的獎勵等你拿\n9. 本遊戲寶圖一切 寶圖可開一切\n10. 長期穩定 持續開發 每週一個功能 禁止遊戲內刷廣告 變相拉人 發現直接封號處理"
|
|
|
|
var mask = FGUtil.getComponent(this.guidePanel, "mask");
|
|
var close = FGUtil.getButton(this.guidePanel, "alert/close");
|
|
this.pushCloseEvent(mask, this.guidePanel);
|
|
this.pushCloseEvent(close, this.guidePanel);
|
|
}
|
|
|
|
/**
|
|
* 添加關閉事件
|
|
*/
|
|
pushCloseEvent(item: fairygui.GComponent, target: fairygui.GComponent, call: Function = null) {
|
|
item.clearClick();
|
|
item.onClick(() => {
|
|
call && call()
|
|
FGUtil.dispose(target);
|
|
}, this)
|
|
}
|
|
} |