f78b98f9-2014-4511-9661-aebf2a00bd65.js
974 Bytes
"use strict";
cc._RF.push(module, 'f78b9j5IBRFEZZhrr8qAL1l', 'MapUtil');
// scripts/kernel/battle/map/MapUtil.ts
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MapUtil = void 0;
var MapUtil = /** @class */ (function () {
function MapUtil() {
}
MapUtil.getThreeStarScore = function (mapData) {
return Math.floor(mapData.totalScore * 0.6);
};
MapUtil.getStarRate = function (mapData) {
var threeStarScore = this.getThreeStarScore(mapData);
if (mapData.curScore >= threeStarScore) {
return 3;
}
else if (mapData.curScore < threeStarScore && mapData.curScore >= Math.floor(threeStarScore * 0.6)) {
//达到三星分数的60%
return 2;
}
else if (mapData.curScore >= Math.floor(threeStarScore * 0.15)) {
return 1;
}
return 0;
};
return MapUtil;
}());
exports.MapUtil = MapUtil;
cc._RF.pop();