I haven't actually played many of these types of games so it's a nice breath of fresh air for me. I think the balancing is a bit off (gets too difficult too quickly) but it's manageable. The events come up a bit too quickly for me and losing resources while on the road is a bit unfair if you ask me (better to apply the resource loss after every event). But I still enjoyed playing it on concept alone. Awesome to see you here for a 4th time, don't stop now! Thank you for making :)
Also I was looking through your source code see if I could assist you anywhere and I think there's some things you could apply in any future programming endeavours.
- The EventPanelController script screams of classes to me. I would have created a nested class inside EventPanelController, call it something like "Event" and then you can just put any necessary variables inside of it (eventName, eventTitle, button1Active, button2Active etc.). You then put [System.Serializable] for the class, create an array or a list and then you can just make events in the editor :) ```
``` //This is all inside EventPanelController.cs
[System.Serializable] public class Event { //Stick all your variables in here }
public List allEvents = new List(); ``` - You could have probably stuck all those survivor sprites into an array - To fix your bug you would just not translate the bus in general (also you forgot to * carMoveSpeed by Time.deltaTime), what you would use is a co-routine. Let me demonstrate.
``` //This is your co-routine, named RoadCycle, coroutines accept parameters IENumerator RoadCycle (float time) { //Makes the co-routine run forever while(true) { yield return new WaitForSeconds(time); //All your code goes here } }
//How often new events occur public float timePerCycle;
void Start() { StartCoroutine(RoadCycle(timePerCycle)); } ```
I hope this all helps :)