Files
Cielonos/Assets/Scripts/MainGame/GameRun/Map/MapBaseCollection.cs
SoulliesOfficial 47125f95f4 地图初步
2026-04-30 07:06:38 -04:00

33 lines
1.0 KiB
C#
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.
using System.Collections.Generic;
using System.Linq;
using Cielonos.Core;
using Sirenix.OdinInspector;
using UnityEngine;
namespace Cielonos.MainGame.Map
{
[CreateAssetMenu(fileName = "MapBaseCollection", menuName = "Cielonos/BaseCollections/MainGameBaseCollection")]
public partial class MapBaseCollection : BaseCollection<MapBaseCollection>
{
}
public partial class MapBaseCollection
{
[Title("Spawn Points")]
[Tooltip("不同组别对应的颜色用于编辑器显示。注意只需要SpawnPoint的groupName包含该字符串即可匹配。")]
public Dictionary<string, Color> groupColors = new Dictionary<string, Color>();
public Color GetGroupColor(string groupName)
{
if (!string.IsNullOrEmpty(groupName))
{
foreach (var pair in groupColors.Where(pair => groupName.Contains(pair.Key)))
{
return pair.Value;
}
}
return Color.white;
}
}
}