"use strict"; cc._RF.push(module, '0ab24G2T2JArJP7gMPVFyU/', 'element_controller'); // Scripts/mod/element/element_controller.js "use strict"; // -------------------------------------------------------------------- // @author: xxx@syg.com(必填, 创建模块的人员) // @description: // 这里填写详细说明,主要填写该模块的功能简要 //
Create: 2019-09-16 19:26:31 // -------------------------------------------------------------------- var ElementController = cc.Class({ "extends": BaseController, ctor: function ctor() {}, // 初始化配置数据 initConfig: function initConfig() { var ElementModel = require("element_model"); this.model = new ElementModel(); this.model.initConfig(); }, // 返回当前的model getModel: function getModel() { return this.model; }, // 注册监听事件 registerEvents: function registerEvents() {}, // 注册协议接受事件 registerProtocals: function registerProtocals() { // this.RegisterProtocal(1110, this.on1110); this.RegisterProtocal(25000, this.handle25000); // 元素神殿基础数据 this.RegisterProtocal(25001, this.handle25001); // 元素神殿挑战 this.RegisterProtocal(25002, this.handle25002); // 元素神殿扫荡 this.RegisterProtocal(25003, this.handle25003); // 购买挑战次数 this.RegisterProtocal(25004, this.handle25004); // 挑战次数刷新 this.RegisterProtocal(25005, this.handle25005); // 最大关卡数更新 }, handle25000: function handle25000() {}, handle25001: function handle25001() {}, handle25002: function handle25002() {}, handle25003: function handle25003() {}, handle25004: function handle25004() {}, handle25005: function handle25005() {}, //打开元素神殿主界面 openElementMainWindow: function openElementMainWindow(status) { if (status == true) { var is_open = this.model.checkElementIsOpen(); if (!is_open) { return; } if (this.element_main_wnd == null) { this.element_main_wnd = ElementMainWindow.New(); } if (this.element_main_wnd.isOpen() == false) { this.element_main_wnd.open(); } } else { if (this.element_main_wnd) { this.element_main_wnd.close(); this.element_main_wnd = null; } } } }); module.exports = ElementController; cc._RF.pop();