Context I am using a Unity ScriptableObject to define basic Enemy Stats
So I have an Enum for special damage types but some enemies might have resistances like Fire Elemental might obviously take no Fire Damage
So what I originally thought of was having an array that carries the number associated since both Enums and Arrays, start at zero. Zero on the Enum would correlate to zero for the array. This can be done I believe but it makes it hard to read cause there is no structure to display what it is 0 Physical? Fire? Cold?
So I would like to know how I can display it easily (hopefully in the Unity Inspector) other than commenting what each number is.
public enum SpecialDamageType
{ // What Resist affectes this attack
Physical,
Fire,
Cold,
Lightning,
Hydro,
Air,
}
public struct DamageStatsStruct
{
public float weaponDamagef;
public float weaponArmourPeircingf;
public WeaponDamageType weaponDamageType;
public float SpecialCaseDurationf;
public float SpecialCaseStrengthf;
public SpecialCaseType specialCaseType;
public float specialDamagef;
public SpecialDamageType specialDamageType;
}
public class EnemyParent : ScriptableObject
{ // Abstract Class
// Finish Get Set for Variables
[Header("Enemy Details")]
[SerializeField] public string enemyName;
[SerializeField] public string enemyDesc;
[Header("Enemy Stats")]
[SerializeField] public float enemyMaxHealthf;
[SerializeField] protected float enemyArmourf;
[SerializeField] protected float enemyMaxShield;
[SerializeField] protected float enemyWalkSpeed;
[SerializeField] protected float enemyRunSpeed;
}
If you need any more info, I would be happy to supply Thanks for any feedback
I know I can get the array to work, just would like an easier-read version through the Unity Inspector