2023-12-20 19:25:48 +08:00
|
|
|
using LC.Newtonsoft.Json;
|
2023-08-22 19:08:45 +08:00
|
|
|
using System;
|
2025-06-24 17:08:33 +08:00
|
|
|
using System.Collections.Generic;
|
2023-08-22 19:08:45 +08:00
|
|
|
using Gameplay;
|
2024-03-26 12:19:26 +08:00
|
|
|
using Gameplay.Unit.Data;
|
2023-11-30 15:47:49 +08:00
|
|
|
using PhxhSDK.Phxh;
|
2024-03-26 12:19:26 +08:00
|
|
|
using Sirenix.OdinInspector;
|
2023-08-22 19:08:45 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
2023-11-19 22:57:17 +08:00
|
|
|
[Serializable]
|
2023-08-22 19:08:45 +08:00
|
|
|
public class MapBlockData
|
|
|
|
|
{
|
2023-12-18 19:42:46 +08:00
|
|
|
public int TerrainTypeIndex = -1;
|
2024-03-26 12:19:26 +08:00
|
|
|
|
2023-08-22 19:08:45 +08:00
|
|
|
public bool IsDefaultTerrainType()
|
|
|
|
|
{
|
|
|
|
|
return TerrainTypeIndex == -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public TerrainTypeProperty GetTerrainTypeProperty()
|
|
|
|
|
{
|
|
|
|
|
var props = TerrainTypeConfig.TerrainTypeProperties;
|
|
|
|
|
if (props != null && TerrainTypeIndex >= 0 && TerrainTypeIndex < props.Count)
|
|
|
|
|
{
|
|
|
|
|
return props[TerrainTypeIndex];
|
|
|
|
|
}
|
2024-03-26 12:19:26 +08:00
|
|
|
|
2023-08-22 19:08:45 +08:00
|
|
|
return TerrainTypeConfig.DefaultTerrainTypeProperty;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class TerrainTypeProperty
|
|
|
|
|
{
|
2025-04-27 15:26:33 +08:00
|
|
|
[HideInInspector] public int id = -1;
|
2023-08-22 19:08:45 +08:00
|
|
|
public string name;
|
|
|
|
|
public bool selectable;
|
|
|
|
|
public bool banAttack;
|
|
|
|
|
public int crossLevel;
|
|
|
|
|
|
2025-06-24 13:09:34 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// 通行标记
|
|
|
|
|
/// </summary>
|
2025-06-24 17:45:47 +08:00
|
|
|
[LabelText("通行标记")]public List<int> crossTagIds = new List<int>();
|
2025-06-24 13:09:34 +08:00
|
|
|
|
2024-03-26 12:19:26 +08:00
|
|
|
public bool AddBuff;
|
2023-08-22 19:08:45 +08:00
|
|
|
|
2025-06-05 18:43:49 +08:00
|
|
|
[ShowIf("AddBuff")] public int[] bulletIds;
|
2023-08-22 19:08:45 +08:00
|
|
|
|
2025-03-31 14:09:11 +08:00
|
|
|
[HideInInspector] public string buffObjectPath;
|
|
|
|
|
|
2024-03-26 12:19:26 +08:00
|
|
|
[JsonConverter(typeof(ColorJsonConverter))]
|
|
|
|
|
public Color Color;
|
|
|
|
|
}
|