53 lines
1.7 KiB
C#
53 lines
1.7 KiB
C#
using UnityEngine;
|
|
using Northbound;
|
|
|
|
namespace Northbound.Data
|
|
{
|
|
public partial class TowerData
|
|
{
|
|
[Header("Runtime References")]
|
|
[Tooltip("Prefab reference - set by data pipeline")]
|
|
public GameObject prefab;
|
|
[Tooltip("UI icon")]
|
|
public Sprite icon;
|
|
|
|
[Header("Placement Settings")]
|
|
[Tooltip("Offset from grid position")]
|
|
public Vector3 placementOffset = Vector3.zero;
|
|
[Tooltip("Can rotate this building?")]
|
|
public bool allowRotation = true;
|
|
|
|
[Header("Health Settings")]
|
|
[Tooltip("Can this building be damaged?")]
|
|
public bool isIndestructible = false;
|
|
[Tooltip("Auto-regenerate health over time")]
|
|
public bool autoRegenerate = false;
|
|
[Tooltip("Health regeneration per second")]
|
|
public int regenPerSecond = 1;
|
|
|
|
[Header("Vision Settings")]
|
|
[Tooltip("Does this building provide vision?")]
|
|
public bool providesVision = true;
|
|
|
|
[Header("Construction Settings")]
|
|
[Tooltip("건설 시 사용할 도구")]
|
|
public EquipmentData constructionEquipment;
|
|
|
|
[Header("Properties for convenience")]
|
|
public int width => sizeX;
|
|
public int length => sizeY;
|
|
public float height => sizeY;
|
|
public int maxHealth => maxHp;
|
|
public float visionRange => atkRange;
|
|
public float requiredWorkAmount => manpower;
|
|
|
|
public Vector3 GetSize(int rotation)
|
|
{
|
|
bool isRotated = (rotation == 1 || rotation == 3);
|
|
float w = isRotated ? length : width;
|
|
float l = isRotated ? width : length;
|
|
return new Vector3(w, sizeY, l);
|
|
}
|
|
}
|
|
}
|