"use strict";
|
cc._RF.push(module, '18c73U4iDZOmKL3C3og4MHa', 'esecsice_controller');
|
// Scripts/mod/esecsice/esecsice_controller.js
|
|
"use strict";
|
|
// --------------------------------------------------------------------
|
// @author: whjing2012@syg.com(必填, 创建模块的人员)
|
// @description:
|
// 这里填写详细说明,主要填写该模块的功能简要
|
// <br/>Create: 2019-01-07 15:18:54
|
// --------------------------------------------------------------------
|
var EsecsiceConst = require("esecsice_const");
|
|
var EsecsiceController = cc.Class({
|
"extends": BaseController,
|
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);
|
},
|
openEsecsiceView: function openEsecsiceView(bool) {
|
if (bool) {
|
if (!this.esecsiceView) {
|
var EsecsiceWindow = require("esecsice_window");
|
|
this.esecsiceView = new EsecsiceWindow();
|
}
|
|
this.esecsiceView.open();
|
} else {
|
if (this.esecsiceView) {
|
this.esecsiceView.close();
|
this.esecsiceView = null;
|
}
|
}
|
},
|
switchEcecsiceActivityView: function switchEcecsiceActivityView(type) {
|
Log.info("====>>>", type);
|
|
if (type == EsecsiceConst.execsice_index.endless) {
|
require("mainui_controller").getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.Endless);
|
} else if (type == EsecsiceConst.execsice_index.stonedungeon) {
|
require("mainui_controller").getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.DungeonStone);
|
} else if (type == EsecsiceConst.execsice_index.heroexpedit) {
|
require("mainui_controller").getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.ExpeditFight);
|
} else if (type == EsecsiceConst.execsice_index.honourfane) {
|
//荣耀神殿玩法
|
require("mainui_controller").getInstance().requestOpenBattleRelevanceWindow(require("battle_const").Fight_Type.PrimusWar);
|
}
|
},
|
getEsecsiceRoot: function getEsecsiceRoot(finish_cb) {
|
if (!finish_cb) {
|
if (this.esecsiceView) return this.esecsiceView.root_wnd;
|
} else {
|
if (this.esecsiceView) {
|
this.esecsiceView.getRootWnd(finish_cb);
|
} else {
|
finish_cb(null);
|
}
|
}
|
}
|
});
|
module.exports = EsecsiceController;
|
|
cc._RF.pop();
|