Hi, all. Hoping someone can tell me find what I have missed with the hitBomb() in part 10 of the tutorial. I currently have the bomb appear when all stars are collected and a new set of stars appear to start the process again (which adds another bomb). However, the bombs do not collide with the platforms and in my code, when passing in bomb as the second argument I have vscode show me this message.
/* “bomb” is declared but its value is never read */
I am confident everything will work if the bomb value is read in the function but i have tried a few different things now and im losing my mind.
I would appreciate any help from you kind folk so that I can carry on with my game dev journey and onto the next phase of my evil plan to create a bigger lootbox scam than EA is running right now!
hey samme, thanks for the quick reply. Apologies, I should have mentioned in my post that there are no errors showing in the console.
I am just not sure where to place the bomb variable in my code so that it will be used by the function. I have placed it outside of the main constructor (as i have with others and those variables work fine) and also tried placing it in several places within the constructor class. Im very confused haha
ah so i just need to use it inside the function … well that all makes perfect sense now! I knew it would be something silly that i missed haha. Noobs eh!
I really appreciate you taking the time to help samme, thank you for that