pubgv3/assets/scripts/game/tileConfig.js
zhuguoqing ff550d5d6a init
2022-05-22 10:32:02 +08:00

54 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var tileres = {
1: "smoke2", //灰尘,地表特效贴图
2: "water", //水,地表特效贴图
3: "water", //泥地 ,地表特效贴图
4: "water" //草 ,地表特效贴图
}
var tileres2 = {
2: "eff_ground4", //水波纹在2号地表上角色身上出现特效预制eff_ground4
}
var cantskill = {
2: true
}
var canusewz = {
30701:2,//equipId:tilemap贴图文件图块ID该道具仅可在2号地形上使用
}
//加地图预制时对应加上如下数据var mapX = {}
var map1 = {
//对应tilemap贴图文件的图块ID
1: [0],//地面,灰尘特效
2: [1],//水面,水花特效
3: [2],//泥地,泥地特效
4: [3]//草,飘叶特效
}
function predo(mapdata) {
var temp = {}
for (var k in mapdata) {
var arr = mapdata[k]
for (var i = 0; i < arr.length; i++) {
temp[arr[i]] = k
}
}
return temp
}
var tileConfig = {
maps: {
map1: predo(map1), //同步添加地图数据
},
tileres: tileres,
tileres2: tileres2,
cantskill: cantskill,
canusewz:canusewz,
}
module.exports = tileConfig;