I have a UserInputProcessor class which extends Monobehaviour.
One of its fields is a Controller class I’ve implemented that extends nothing.
One of the fields of this Controller class is a Cooldown class which extends Monobehaviour.
In other words, the User tells the controller what to do. And the controller contains all the cooldowns. Now here’s the pickle. Unity doesn’t let people instantiate objects of type Monobehaviour. The cooldown class needs to extend Monobehaviour in order to use the Invoke functions.
I really do not want to have to pass the GameObject down from the UserInput class to the Controller(s) just for the sake of passing it down to the Cooldowns.
Is there a (clean) way of solving this little pickle?
Also, I cannot hard code which game object to find in the Cooldown class because I’ll be using cooldowns for different players/enemies.