Quick Update on what I got working
So I got what has been recently some rare free time to actually sit down and work on this and in 3 hours I managed to get a fair bit done tonight. I felt that because I had a load of free time on my hands tonight I woudl attempt the re-writing of some of the bomb code and also creating the bomb into a prefab. I did this first as I felt that this was most likely going to go awry at some point and take a while to get working. I was wrong! It all actually went pretty smoothly with no hiccups. First I reworked part of the bomb code so instead of re-using the same bomb over and over it contributed to a central amount of bombs on screen that woudl be checked off against the amount of bombs that are supposed to be on screen. This means that when a bomb is destroyed it drops the amount on screen by one, then in an update function on the main game controller it checks the amount of on screen bombs vs the amount needed, if the amount on screen is lower then it calls for a new bombs to be created from the prefab.
Once I had done this part I created the prefab of the bomb and ran a few test's all of which worked fine. Then I removed the bomb that was on screen to start with so the whole process can work and that worked fine with no issues. So I played a couple of games at easy level and then tweaked some of the difficulty settings as it was far too easy for too long then quickly runs through a medium phase and jumps into hard to rapidly. This will take more tweaking around with to get a good feel for the difficulty but that was not my purpose tonight.
With the prefabs working and creating as they should I was happy this was working well and glad I went this way as I wasn't getting nor should I now see that issue I had previously with dropping bombs being out of sync. I then set a flag for the bombs kick off that if the game was over then no new bombs are created. My plan is to use this process at the end of a game and at the beginning for the intro and the outro of the scene,that way things aren't happening that shouldn't be. With all of that done and sorted that was now 95% of the actual game play coding done and dusted and fingered crossed all working properly. So i decided to look into sound effects and how to get these working.
I found and clipped a load of explosion sounds and implemented one on the explosion for the buildings on the ground and apart from not realising I had to add an audio source to the game object all worked fine, although it did take about 10 mins to work out the audio source part. I then set about setting up an array of sound files so it would select a different explosion each time rather than you hearing the same thing over and over. This caused an issue as I thought I would be able to refer to the file name and it would play it, but alas it actually wanted a sound object. This meant my normal string array select would not work, so I spent about 30 minutes working out how to do sound arrays, which actually are quite easy to do and implemented that not only for the house explosions but also for the bomb's in the air explosions. Finally I added in a sound for the cannon firing and to be honest it finally flet like things were starting to come together and this was feeling more like a game. Yes I need to go back and re edit some of the sound clips and make some more but it really is feeling like this is a game at last.
Going forward like I said my focus will be on editing the current sounds I have and getting some more to use as well then implementing these. On top of that I need to create the intro and outro for the game scene, oth of which I have an idea of how I want them to work, it is just a case of making the animations and coding/putting them in. Unfortunately though the rest of this week I wont get a chance to work on this as I am away to Italy for a couple of days and if all goes well there then I will be going back over a few more times in the next 6 months. But fear not, once I get back I will be powering through all of this to try and get as much done as I can as like I said the end is in sight for this project and I am actually getting quite excited that it is almost done and is all finally coming together.