Hello everybody
I’m very new to unity, had a little bit of programming experience before, but now I’m kinda getting into some more advanced stuff and I have hit a wall:
Currently I’m trying to create a simple, UI-based 2D game. I have a MonoBehaviour script called “EventConductor” that contains a bunch of methods to show stuff on-screen: Currently, these methods display speechbubbles, character images, emotes, and so on…
I also have a “DataController” script that contains several pre-generated variables and object instances (think Items, Characters, etc…). All other scripts pull from this one if they need any predefined data (I’ll probably outsource most of this to XML files or something similar later and the DataController just loads and parses it).
Now, I want to save a “Sequence” of EventConductor methods into a list (or similar), so I can basically construct a preconfigured “cutscene” in my DataController. The EventConductor then pulls that list and executes the methods in the correct order with appropriate delays between them to show the “cutscene” on-screen.
How would the more experienced among you go about this? I’ve tried a lot of things - first, I made all the EventConductor methods IEnumerators and saved them into a list… quickly realized that’s a bad idea. Then I tried Delegates, but my EventConductor methods have lots of different parameters with different types each and I can’t seem to pass any parameters with a delegate…
I mean, this is such a basic piece of functionality for any game with cutscenes, I feel really dumb that I can’t figure it out… been stuck on this for four days now.
Thanks in advance for any tips!