EscapeShooter/My project/Assets/Project Files/Game/Scripts/UI/UIHelper.cs

27 lines
752 B
C#
Raw Normal View History

using UnityEngine;
namespace Watermelon.SquadShooter
{
public static class UIHelper
{
public const float PANEL_HEIGHT = 115.0f;
private static readonly Vector2[] PANEL_SIZES = new Vector2[]
{
new Vector2(200.0f, PANEL_HEIGHT),
new Vector2(215.0f, PANEL_HEIGHT),
new Vector2(240.0f, PANEL_HEIGHT),
new Vector2(268.0f, PANEL_HEIGHT),
new Vector2(285.0f, PANEL_HEIGHT),
new Vector2(300.0f, PANEL_HEIGHT)
};
public static Vector2 GetPanelSize(int charactersCount)
{
if (PANEL_SIZES.IsInRange(charactersCount))
return PANEL_SIZES[charactersCount];
return PANEL_SIZES[PANEL_SIZES.Length - 1];
}
}
}