I'm a self-taught noob and taught myself programming with C++, but now I'm building a game in Unity with C# and I'm fairly new to C#.
I have a class called Parameters that pretty much is just a giant list of variables of stats (HP, attack, defense, etc.) for the game's characters.
Then I have a class called Item and a child class called Potion.
I want the Potion class to be able to hold a variable that tells it which one of the variables in the Parameters class it needs to affect.
I don't want to create a separate class for weapon potion, health potion, defense potion, etc, so that an individual instance of Potion could be easily customized by a random generator (or player generation system). And then I could just call the Use() function of the Potion class that does something like whateverVariableInParametersThisItemWorksWith += potionStrengthValue.
I feel like the way I should accomplish this is have a pointer within Potions that points to a variable in Parameters. But... that's not really how C# is supposed to work, so I really don't know what to do. I don't want to use a pointer and I want to understand C# better...