"use strict"; cc._RF.push(module, 'bf36fCSxdRFY7OOT091JucG', 'limitexercise_model'); // Scripts/mod/limitexercise/limitexercise_model.js "use strict"; // -------------------------------------------------------------------- // @author: xxx@syg.com(必填, 创建模块的人员) // @description: // 这里填写详细说明,主要填写该模块的功能简要 //
Create: 2019-09-09 19:11:57 // -------------------------------------------------------------------- var LimitexerciseModel = cc.Class({ "extends": BaseClass, ctor: function ctor() {}, properties: {}, initConfig: function initConfig() {}, // --轮次 getCurrentRound: function getCurrentRound() { if (this.limitexercise_data && this.limitexercise_data.round) { var round_data = Config.holiday_boss_new_data.data_round_list; if (round_data && round_data[this.limitexercise_data.round]) { return round_data[this.limitexercise_data.round].unit_round; } } return 1; }, setLimitExerciseData: function setLimitExerciseData(data) { this.limitexercise_data = data; }, setChangeCount: function setChangeCount(count, buy_count) { if (this.limitexercise_data && this.limitexercise_data.count != null && this.limitexercise_data.buy_count != null) { this.limitexercise_data.count = count; this.limitexercise_data.buy_count = buy_count; } }, setHeroUseId: function setHeroUseId(data) { this.hero_use_list = {}; for (var i = 0; i < data.length; ++i) { var v = data[i]; this.hero_use_list[v.id] = v.count; } }, getHeroUseId: function getHeroUseId(id) { if (this.hero_use_list && this.hero_use_list[id]) { return this.hero_use_list[id]; } return 0; }, //难度 getCurrentDiff: function getCurrentDiff() { if (this.limitexercise_data) { return this.limitexercise_data.difficulty || 1; } return 1; }, //正在挑战的关卡id getCurrentChangeID: function getCurrentChangeID() { if (this.limitexercise_data) { return this.limitexercise_data.order || 1; } return 1; }, //当前关卡的血量 getCurrentBossHp: function getCurrentBossHp() { if (this.limitexercise_data) { return this.limitexercise_data.hp_per || 0; } return null; }, //宝箱状态 getBoxStatus: function getBoxStatus() { if (this.limitexercise_data) { return this.limitexercise_data.status || 0; } return 0; }, //关卡类型 getCurrentType: function getCurrentType() { if (this.limitexercise_data) { return this.limitexercise_data.order_type || 0; } return null; }, //获取今日购买次数 getDayBuyCount: function getDayBuyCount() { if (this.limitexercise_data) { return this.limitexercise_data.buy_count || 0; } return 0; }, //剩余挑战次数 getReaminCount: function getReaminCount() { if (this.limitexercise_data) { return this.limitexercise_data.count || 0; } return 0; }, //获取基本数据 getLimitExerciseData: function getLimitExerciseData() { if (this.limitexercise_data) { return this.limitexercise_data; } return null; } }); cc._RF.pop();