Handbuch Tabs: Bauen und Index (fertig)
UI_Prefabs HandbuchDataAssets
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace DepthsOfGreed.HandbookUI
|
||||
{
|
||||
public enum HandbookTowerCategory { Munition, Energie, Spezial }
|
||||
|
||||
[CreateAssetMenu(menuName = "Depths of Greed/Handbuch/Turmtyp", fileName = "NeuerTurmtyp")]
|
||||
public sealed class HandbookTowerEntry : ScriptableObject
|
||||
{
|
||||
[Tooltip("Stabile ID für die spätere Gameplay-Anbindung. Nach Zuordnung nicht ändern.")]
|
||||
public string id;
|
||||
public string displayName;
|
||||
public HandbookTowerCategory category;
|
||||
public Sprite icon;
|
||||
[Min(0)] public int energyCost;
|
||||
public string summary;
|
||||
[TextArea(3, 8)] public string description;
|
||||
[Tooltip("Kreis, der die gesamte Basis umschließt. Muss vollständig auf den Ring passen.")]
|
||||
[Min(0.001f)] public float baseRadius = 0.36f;
|
||||
[Tooltip("Abstandskreis: darf andere Abstandskreise nicht überlappen.")]
|
||||
[Min(0.001f)] public float placementRadius = 0.6f;
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
baseRadius = Mathf.Max(0.001f, baseRadius);
|
||||
placementRadius = Mathf.Max(baseRadius, placementRadius);
|
||||
energyCost = Mathf.Max(0, energyCost);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user