更换buff资源路径
parent
cdfab54839
commit
336e0b6fde
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6a0ac836a516042a29947834a089cb77
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -406,14 +406,6 @@ MonoBehaviour:
|
|||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- CollectPath: Assets/Art/Other
|
||||
CollectorGUID: 182d0580800b892448950fb6d6c80103
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackDirectory
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- GroupName: Manual
|
||||
GroupDesc: "\u901A\u8FC7\u6587\u4EF6\u5939\u5206\u7EC4"
|
||||
AssetTags:
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ public class MapManager : MonoBehaviour
|
|||
return null;
|
||||
}
|
||||
|
||||
// 保存需要指示的地格索引
|
||||
/*// 保存需要指示的地格索引 25.4.2 改为进游戏动态读取地格属性
|
||||
public void SaveBuffObjCellIndex(Dictionary<int, string> cells)
|
||||
{
|
||||
if (cells is { Count: > 0 })
|
||||
|
|
@ -165,7 +165,7 @@ public class MapManager : MonoBehaviour
|
|||
Map.MapData.showBuffPoints.Add(showBuffData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public void SaveMapData()
|
||||
{
|
||||
|
|
@ -226,6 +226,15 @@ public class MapManager : MonoBehaviour
|
|||
{
|
||||
var prop = terrainTypeConfig[blockData.TerrainTypeIndex];
|
||||
TGS.CellToggleRegionSurface(i, true, prop.Color);
|
||||
if (!string.IsNullOrEmpty(prop.buffObjectPath))
|
||||
{
|
||||
DebugUtil.LogError("添加buff");
|
||||
MapData.showBuffPoints.Add(new MapData.ShowBuffData
|
||||
{
|
||||
cellIndex = i,
|
||||
path = prop.buffObjectPath,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"AddBuff": false,
|
||||
"buffUnitType": 0,
|
||||
"buffSideType": 0,
|
||||
"buffObjectPath": "Assets/Art/Other/hud/Buff.prefab",
|
||||
"buffObjectPath": "Assets/Art_Out/Other/BuffPoint/Buff.prefab",
|
||||
"Color": {
|
||||
"r": 1.0,
|
||||
"g": 0.0603841133,
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ namespace MapEditor
|
|||
|
||||
#region Fields And Properties
|
||||
|
||||
private const string BuffPrefabPath = "Art/Other/hud";
|
||||
|
||||
private static MapGridWindow thisWindow;
|
||||
|
||||
//1.#FFBF0072 2.#FF960072
|
||||
|
|
@ -107,8 +105,6 @@ namespace MapEditor
|
|||
|
||||
private Dictionary<int, GameObject> _buffPrefabDic;
|
||||
|
||||
private Dictionary<int, string> _buffPathDic;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Editor
|
||||
|
|
@ -116,7 +112,6 @@ namespace MapEditor
|
|||
[Button("保存")]
|
||||
private void RebuildPrefab()
|
||||
{
|
||||
_currMapManager.SaveBuffObjCellIndex(_buffPathDic);
|
||||
_currMapManager.SaveMapData();
|
||||
}
|
||||
|
||||
|
|
@ -267,8 +262,7 @@ namespace MapEditor
|
|||
foreach (var cell in buffObjCells)
|
||||
{
|
||||
var buffObj = CreateBuffObj(cell.cellIndex, cell.path);
|
||||
_buffPrefabDic.Add(cell.cellIndex, buffObj);
|
||||
_buffPathDic.Add(cell.cellIndex, cell.path);
|
||||
_buffPrefabDic.TryAdd(cell.cellIndex, buffObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -283,7 +277,6 @@ namespace MapEditor
|
|||
}
|
||||
|
||||
_buffPrefabDic.Clear();
|
||||
_buffPathDic.Clear();
|
||||
}
|
||||
|
||||
private void LoadMap(TerrainGridSystem tgs, MapData data, Map map)
|
||||
|
|
@ -302,7 +295,6 @@ namespace MapEditor
|
|||
EnhancedTouchSupport.Enable();
|
||||
TerrainTypeConfig.Load();
|
||||
_buffPrefabDic = new Dictionary<int, GameObject>();
|
||||
_buffPathDic = new Dictionary<int, string>();
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
|
|
@ -310,7 +302,6 @@ namespace MapEditor
|
|||
{
|
||||
DestroyBuffObj();
|
||||
_buffPrefabDic = null;
|
||||
_buffPathDic = null;
|
||||
EnhancedTouchSupport.Disable();
|
||||
base.OnDisable();
|
||||
}
|
||||
|
|
@ -492,7 +483,6 @@ namespace MapEditor
|
|||
var buff = CreateBuffObj(cellIndex, path);
|
||||
if (buff == null) return;
|
||||
_buffPrefabDic.Add(cellIndex, buff);
|
||||
_buffPathDic.Add(cellIndex, path);
|
||||
DebugUtil.LogError("格子{0}添加指示图标,路径为{1}", cellIndex, path);
|
||||
}
|
||||
}
|
||||
|
|
@ -507,7 +497,6 @@ namespace MapEditor
|
|||
}
|
||||
|
||||
_buffPrefabDic.Remove(cellIndex);
|
||||
_buffPathDic.Remove(cellIndex);
|
||||
|
||||
DebugUtil.Log("格子{0}移除指示图标", cellIndex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,8 @@ namespace MapEditor
|
|||
{
|
||||
[Serializable]
|
||||
public class EditTerrainType
|
||||
{
|
||||
|
||||
private const string BuffPrefabPath = "Art/Other/hud";
|
||||
{
|
||||
private const string BuffPrefabPath = "Art_Out/Other/BuffPoint";
|
||||
|
||||
public TerrainTypeProperty TerrainTypeProperty;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue