Hello, I’m not exactly sure how to ask this so my title might be off/misleading. I really don’t know what the system is called that I am looking for so if anyone has any ideas please let me know.
Basically what i want is to be able to in editor assign a series of methods to an object that would fire one after another (once the previous one is completed). For instance say i want a sprite to first enlarge then spin and finally to explode. I would like the ability to have separate scripts for each action and set those actions in order in the editor (ideally along with some definable variables - like duration etc). Anyway I’m not sure if it is possible/how to approach the system. Any thoughts?
You could create an array of scripts, expose them to the editor and if you were sure that each one of those scripts would have the same method you could just call it. The best thing to do would probably make it all inherit from an interface, the interface could be something like IEffect
Thanks for all your replies. Some really good ideas which has got me thinking. I’m not super familiar with animation clips. I wonder if i can create a public list (array) of anim clips that I can just drag and drop onto the object.
If your functions had a predefined value of sorts, you might not even need any event at all.
I mean, when you call 3 functions one after an other in the code, unless you are calling them a special way, they will execute in the sequence you give.
Which makes me a bit unsure if I actually understood the question to begin with.