2.5 update
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BumpCombat.Constants
|
||||
{
|
||||
[CreateAssetMenu(menuName = "BumpCombat/Constants/Defense 2.5D Run HUD")]
|
||||
public sealed class Defense25DRunHudConstants : ScriptableObject
|
||||
{
|
||||
public const float ReferenceWidth = 1920f;
|
||||
public const float ReferenceHeight = 1080f;
|
||||
|
||||
[Header("Combat status")]
|
||||
public Vector2 CombatHudBottomLeft = new(24f, 24f);
|
||||
public Vector2 CombatHudSize = new(392f, 136f);
|
||||
public Vector2 HealthTrackSize = new(352f, 12f);
|
||||
public Vector2 ArtifactGaugeSize = new(352f, 18f);
|
||||
public Vector2 ExperienceTrackSize = new(352f, 8f);
|
||||
public float TrackSpacing = 2f;
|
||||
public float ArtifactSlotSize = 60f;
|
||||
public float ArtifactSlotSpacing = 62f;
|
||||
public int MaximumArtifactSlots = 3;
|
||||
public Vector2 GuardTrackSize = new(18f, 94f);
|
||||
public Vector2 GuardFillSize = new(14f, 90f);
|
||||
public float GuardRightOffset = 32f;
|
||||
|
||||
[Header("Run status")]
|
||||
public Vector2 TimerSize = new(220f, 66f);
|
||||
public float TimerTop = 24f;
|
||||
public Vector2 WaveSummarySize = new(700f, 76f);
|
||||
public float WaveSummaryTop = 98f;
|
||||
|
||||
[Header("Map and portals")]
|
||||
public Vector2 MinimapSize = new(300f, 162f);
|
||||
public Vector2 MinimapContentSize = new(288f, 150f);
|
||||
public float MinimapRight = 24f;
|
||||
public float MinimapTop = 24f;
|
||||
public Vector2 PortalListSize = new(320f, 300f);
|
||||
public float PortalListRight = 24f;
|
||||
public float PortalListTop = 194f;
|
||||
public float PortalRowHeight = 24f;
|
||||
public int PortalCount = 12;
|
||||
public Vector2 MissionPanelSize = new(320f, 126f);
|
||||
public float MissionPanelRight = 24f;
|
||||
public float MissionPanelTop = 502f;
|
||||
public int MissionCount = 3;
|
||||
|
||||
[Header("Context panels")]
|
||||
public Vector2 ConstructionSize = new(360f, 300f);
|
||||
public float ConstructionLeft = 24f;
|
||||
public float ConstructionTop = 420f;
|
||||
public Vector2 ModalMaximumSize = new(1040f, 420f);
|
||||
public int HeaderFontSize = 24;
|
||||
public int BodyFontSize = 18;
|
||||
public int SmallFontSize = 14;
|
||||
|
||||
public static bool IsValidViewport(Rect viewport) =>
|
||||
viewport.width > 0f && viewport.height > 0f;
|
||||
|
||||
public static float ScaleForViewport(Rect viewport) => IsValidViewport(viewport)
|
||||
? Mathf.Min(viewport.width / ReferenceWidth, viewport.height / ReferenceHeight)
|
||||
: 0f;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user