I’m trying to make a timer class. I don’t know a whole whole lot about C# so this may be a simple fix, or I may be going around this in the wrong way, let me know.
I’ve made it so it has its own method that takes deltaTime
as an input and increases the value and does some other stuff when it reaches the target time which is given as a parameter (this method is called on Update()
of the main class, could I call it in this class? Would that be more efficient?).
What I need help with is I want to be able to be able to have two methods from the main class, it would call one of them every time it updates the timer, and it would call the other when the timer reaches the target time. Mainly, I want to be able to vary these methods, so whenever I create a new instance of the timer class, I can input two parameters that correspond to methods in the main class, which translates to it calling those two methods in the way mentioned above.
Here is my code:
// paste code here :V