"use strict"; cc._RF.push(module, '194c8GmGllFW47okY5PMj37', 'look_controller'); // Scripts/mod/look/look_controller.js "use strict"; // -------------------------------------------------------------------- // @author: xxx@syg.com(必填, 创建模块的人员) // @description: // 这里填写详细说明,主要填写该模块的功能简要 //
Create: 2019-04-30 16:21:08 // -------------------------------------------------------------------- var HeroController = require("hero_controller"); var LookController = cc.Class({ "extends": BaseController, ctor: function ctor() {}, // 初始化配置数据 initConfig: function initConfig() { var LookModel = require("look_model"); this.model = new LookModel(); this.model.initConfig(); }, // 返回当前的model getModel: function getModel() { return this.model; }, // 注册监听事件 registerEvents: function registerEvents() {}, // 注册协议接受事件 registerProtocals: function registerProtocals() { // this.RegisterProtocal(1110, this.on1110); this.RegisterProtocal(11061, this.handle11061); //--查看对方英雄信息 this.RegisterProtocal(11062, this.handle11062); //--查看对方分享英雄信息 }, sender11061: function sender11061(r_rid, r_srvid, partner_id) { var protocal = {}; protocal.r_rid = r_rid; protocal.r_srvid = r_srvid; protocal.partner_id = partner_id; this.SendProtocal(11061, protocal); }, handle11061: function handle11061(data) { message(data.msg); if (data.bid != 0) { var config = Config.partner_data.data_partner_base[data.bid]; var camp_type = 1; if (config) { camp_type = config.camp_type; } data.camp_type = camp_type; HeroController.getInstance().openHeroTipsPanel(true, data); } }, // --查看对方分享英雄信息 sender11062: function sender11062(id, srv_id) { var protocal = {}; protocal.id = id; protocal.srv_id = srv_id; this.SendProtocal(11062, protocal); }, handle11062: function handle11062(data) { message(data.msg); if (data.bid != 0) { var config = Config.partner_data.data_partner_base[data.bid]; var camp_type = 1; if (config) { camp_type = config.camp_type; } data.camp_type = camp_type; HeroController.getInstance().openHeroTipsPanel(true, data); } } }); module.exports = LookController; cc._RF.pop();