Files
fc/dev/project/library/imports/18/18c73538-8836-4e98-a2f7-0b7a20e0c1da.js
T
2026-05-24 10:21:26 +08:00

74 lines
3.2 KiB
JavaScript

"use strict";
cc._RF.push(module, '18c73U4iDZOmKL3C3og4MHa', 'esecsice_controller');
// Scripts/mod/pve/esecsice_controller.js
"use strict";
// --------------------------------------------------------------------
// @author: whjing2012@syg.com(必填, 创建模块的人员)
// @description:
// 这里填写详细说明,主要填写该模块的功能简要
// <br/>Create: 2019-01-07 15:18:54
// --------------------------------------------------------------------
var BridgeController = require("bridge.controller");
var EsecsiceConst = require("esecsice_const");
var BattleController = require("battle_controller");
// 桥接替换的界面
var EsecsiceController = cc.Class({
"extends": BridgeController,
ctor: function ctor() {},
// 初始化配置数据
initConfig: function initConfig() {
var EsecsiceModel = require("esecsice_model");
this.model = new EsecsiceModel();
this.model.initConfig();
},
// 返回当前的model
getModel: function getModel() {
return this.model;
},
// 注册监听事件
registerEvents: function registerEvents() {},
// 注册协议接受事件
registerProtocals: function registerProtocals() {
// this.RegisterProtocal(1110, this.on1110);
},
// 从服务器初始化数据
reqBaseFromServer: function reqBaseFromServer(_cb) {
// 配置加载
var cfgs = ["dailyplay_data" // 未知,没有对应文件
];
this.loadConfigs(cfgs, function (_ret, _data) {
nx.dt.fnInvoke(_cb, true);
});
},
openEsecsiceView: function openEsecsiceView(bool) {
nx.bridge.createPanel("WndEsenciseMain", {});
},
switchEcecsiceActivityView: function switchEcecsiceActivityView(type) {
if (type == EsecsiceConst.execsice_index.endless) {
BattleController.getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.Endless);
} else if (type == EsecsiceConst.execsice_index.stonedungeon) {
BattleController.getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.DungeonStone);
} else if (type == EsecsiceConst.execsice_index.planesafk) {
var PlanesafkController = require("planesafk_controller");
PlanesafkController.getInstance().sender28601();
} else if (type == EsecsiceConst.execsice_index.honourfane) {
//荣耀神殿玩法
BattleController.getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.PrimusWar);
} else if (type == EsecsiceConst.execsice_index.startower) {
BattleController.getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.StarTower);
} else if (type == EsecsiceConst.execsice_index.element) {
BattleController.getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.ElementWar);
} else if (type == EsecsiceConst.execsice_index.adventure) {
BattleController.getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.Adventrue);
} else if (type == EsecsiceConst.execsice_index.heaven) {
BattleController.getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.HeavenWar);
}
}
});
module.exports = EsecsiceController;
cc._RF.pop();