the model window is done and seems to be functioning properly. i even adjusted it a bit to allow for an even more generic version with no buttons and just text that i can use for my ready and game over panels. i have to dismiss it manually by setting boolean animation parameters, but that’s how I’ve been handling calling and dismissing windows and panes anyway, so it doesn’t feel like a big deal and if you disregard having to get references to the animator, it’s really only one line of code. i still need to break the animations down a bit further and segregate the fill panel and actual modal panel, so that i can display the screen fill with one animation parameter and the modal window with a second one.
the audio controller happened by accident kinda, trying to do a sort of “quality of life” improvement for myself. as it were, i had to start the game from the title scene (index 0) for the background music to change and update appropriate to scene/level changes and also account for loading screens. I’ve settled on using a singleton for this and will refactor this decision later if my needs change. for now it seems to work well enough. i can now test the game from any scene and the audio controller singleton is accessed from a separate music controller script, which has individual OnLevelLoaded functions for each scene. the OnLevelLoaded methods select the appropriate track to feed from a public audio clip array and set the volume for each clip on a scene by scene basis. for now this means an if statement for every scene, but for now I’m okay with that… and if a pattern emerges I’ll try to work with that to optimize if totally necessary.
sounds like mostly success stories for the moment, but i am getting more and more paranoid i am coding things in bad practice. i find myself having to find what feel like very hacky solutions to seemingly simple problems… today i was putting nested if statements inside of coroutines, each of which if statement’s condition was a temporary boolean value that i set to true right before the loop and the to false on the first line of the loop itself. maybe I’m too critical on the specifics… the fact is, it works and it feels so good to see the game render exactly what i wanted to see.