Make list of functions wich i can then call.
Hello!
I am trying to make a class with a list of functions and then i want to call all functions in that list. I want other classes to add functions to the list.
What i am trying to achieve is a list of functions to call when needed and for other classes to be able add themselves to the list in their own Start function.
The goal is when a unit attack it calls all functions in the list "onAttackAbilities". And when a unit gets attacked it calls all function in the list "attackedAbilities". I want the list to be different in size and what they contain depending on what component i have attached to the different units. This is why i want each component/class to be able to add itself to the list.
Thanks in advance!
Your answer

Follow this Question
Related Questions
Updating a List from a Custom Inspector 0 Answers
Firebase List Users 1 Answer
list.contains problem 1 Answer
[Quiz Game] How to prevent Question asked twice. HELP 1 Answer