How do I get a list of all the variables in a class, to be used in another class to indicate which Variables will and can be changed by it for example. This is mainly for not having to rewrite a enum when some variables are changed or added.
Edit: I want to create a class that has some stats that can be modified (Main), and another type of class (ModifyingObject) that has a list of all the stats that it can change and by how much. I want to easily get the variables of the main class, and add a list of which variables does the modifying class change. if I have let's say 10 variables for different stats how can I easily list all the stats the ModifyingObject class can change in the Main class.
public class Main{
float SomeStat = 0;
string SomeName = "name";
List<ModifyingObject> objects;
bool CanModifyStatInThisClas(ModifyingObject object){
//check if the custom object can modify stats in this class
}
}
public class ModifyingObject{
....
}