52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
using UnityEngine;
|
|
using EE2Clone.Core;
|
|
|
|
namespace EE2Clone.Data
|
|
{
|
|
[CreateAssetMenu(fileName = "NewUnitData", menuName = "EE2Clone/Unit Data")]
|
|
public class UnitDataSO : ScriptableObject
|
|
{
|
|
[Header("Identity")]
|
|
public int Id;
|
|
public string UnitName;
|
|
public UnitClass UnitClass;
|
|
public Epoch RequiredEpoch;
|
|
|
|
[Header("Stats")]
|
|
public float MaxHealth = 100;
|
|
public float MoveSpeed = 4f;
|
|
public float AttackDamage = 10f;
|
|
public float AttackRange = 1.5f;
|
|
public float AttackCooldown = 1f;
|
|
public float Armor = 1f;
|
|
public float LineOfSightRange = 10f;
|
|
|
|
[Header("Gathering (Citizens only)")]
|
|
public int MaxCarryCapacity = 10;
|
|
public float GatherSpeed = 1f;
|
|
public float BuildSpeed = 1f;
|
|
|
|
[Header("Cost")]
|
|
public int FoodCost;
|
|
public int WoodCost;
|
|
public int StoneCost;
|
|
public int GoldCost;
|
|
public int TinCost;
|
|
public float TrainTime = 10f;
|
|
public int PopulationCost = 1;
|
|
|
|
[Header("Counter Bonuses")]
|
|
public CounterBonus[] CounterBonuses;
|
|
|
|
[Header("Visuals")]
|
|
public GameObject Prefab;
|
|
}
|
|
|
|
[System.Serializable]
|
|
public struct CounterBonus
|
|
{
|
|
public UnitClass TargetClass;
|
|
public float Multiplier;
|
|
}
|
|
}
|