I have several values of type Upgradable in my C# script:
public class Player
{
public Upgradable speed;
public Upgradable damage;
public Upgradable reload;
int someVar1; //etc., there are other variables
}
And I should create a method GetAllUpgrades() in each class to run trough upgrades and update each of them. Here I store an array of Upgradable values that I've added manually. But are there some ways to do it automatically?
Aucun commentaire:
Enregistrer un commentaire