Files
2026-05-23 22:10:14 +08:00

79 lines
3.1 KiB
JavaScript

// --------------------------------------------------------------------
// @author: whjing2012@syg.com(必填, 创建模块的人员)
// @description:
// 这里填写详细说明,主要填写该模块的功能简要
// <br/>Create: 2019-01-07 15:18:54
// --------------------------------------------------------------------
const BridgeController = require( "bridge.controller" );
var EsecsiceConst = require("esecsice_const");
const BattleController = require("battle_controller");
// 桥接替换的界面
var EsecsiceController = cc.Class({
extends: BridgeController,
ctor: function () {
},
// 初始化配置数据
initConfig: function () {
var EsecsiceModel = require("esecsice_model");
this.model = new EsecsiceModel();
this.model.initConfig();
},
// 返回当前的model
getModel: function () {
return this.model;
},
// 注册监听事件
registerEvents: function () {
},
// 注册协议接受事件
registerProtocals: function () {
// this.RegisterProtocal(1110, this.on1110);
},
// 从服务器初始化数据
reqBaseFromServer: function( _cb ) {
// 配置加载
let cfgs = [
"dailyplay_data", // 未知,没有对应文件
];
this.loadConfigs( cfgs, ( _ret, _data ) => {
nx.dt.fnInvoke( _cb, true );
} );
},
openEsecsiceView : function(bool){
nx.bridge.createPanel("WndEsenciseMain",{});
},
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;