Right now I have a bunch of public stat variables in my AI script like:
public float SeeDistance;
public float SeeFOV;
public int health;
public bool alertState;
public bool isRifleEquipted;
public bool isPistolEquipted;
public bool isEngaging;
In the same script. If this AI spots an enemy AI I need to retrieve the stats of the enemy AI. Right now I just use something like:
GetComponent<AIScript>().SeeDistance
GetComponent<AIScript>().SeeFOV
GetComponent<AIScript>().health
GetComponent<AIScript>().alertState;
GetComponent<AIScript>().isRifleEquipted;
GetComponent<AIScript>().isPistolEquipted;
GetComponent<AIScript>().isEngaging;
It works fine but is there a way to retrieve all the stats with 1 GetComponent? Instead of calling GetComponent for each individual stat?