2023-02-08 15:06:43 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Pal.Client.Rendering
|
|
|
|
|
{
|
2023-02-15 22:17:19 +00:00
|
|
|
|
internal sealed class MarkerConfig
|
2023-02-08 15:06:43 +00:00
|
|
|
|
{
|
2023-02-11 20:10:45 +00:00
|
|
|
|
private static readonly MarkerConfig EmptyConfig = new();
|
|
|
|
|
private static readonly Dictionary<Marker.EType, MarkerConfig> MarkerConfigs = new()
|
2023-02-08 15:06:43 +00:00
|
|
|
|
{
|
|
|
|
|
{ Marker.EType.Trap, new MarkerConfig { Radius = 1.7f } },
|
|
|
|
|
{ Marker.EType.Hoard, new MarkerConfig { Radius = 1.7f, OffsetY = -0.03f } },
|
|
|
|
|
{ Marker.EType.SilverCoffer, new MarkerConfig { Radius = 1f } },
|
|
|
|
|
};
|
|
|
|
|
|
2023-02-15 22:17:19 +00:00
|
|
|
|
public float OffsetY { get; private init; }
|
|
|
|
|
public float Radius { get; private init; } = 0.25f;
|
2023-02-08 15:06:43 +00:00
|
|
|
|
|
2023-02-11 20:10:45 +00:00
|
|
|
|
public static MarkerConfig ForType(Marker.EType type) => MarkerConfigs.GetValueOrDefault(type, EmptyConfig);
|
2023-02-08 15:06:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|