I’m a C#/Unity beginner building prototype for a business sim game with a musical theme. The inspiration came from the Football Manager games. After building the first three scenes here, I’m now scripting the “performance simulation” scene where the player controls a band playing a concert for an audience.
I am trying to script a custom method for “Pay” that determines how much the band is paid based on the audience’s reception to their performance. This requires me to pass one variable each across two different scripts into the GameManager class (shown in attached game design outline). After researching how to pass variables between scripts, I’m stuck.
What is the simplest solution to create the “Pay” method in the GameManager class?
If this requires a re-design of my classes I’m totally open to it. It seems there are five or so different ways to pass variables across classes and it’s a little overwhelming. Another challenge is that most data/math work will happen in the background, and not necessarily be attached to a GameObject in the UI that the player sees. I’ve practiced instantiating an object of a class, constructors, Singleton methods, etc and have been unable to get any of these to work. Thanks so much for your help.