Day 5–95% Complete with 2D Game Development

Unfortunately, the cheap free screen capture I used does not record sound!
  1. When we started Spawning from the Asteroid Destruction, I noticed that if I shot multiple lasers it was causing multiple spawns. I removed the sprite after 0.25 after the explosionPrefab was called to create a smoother animation effect. I set a delay on the destruction of the Asteroid by 3.018 to match the animation runtime so it can run through completion but I also destroyed the Collider2D after 0.25seconds so I couldn’t keep shooting for 3.018 seconds. Prior to doing that I could fire repeatedly at the asteroid and trigger multiple explosion sounds and also multiple spawn of ships and powerups! LOL! Instead of destroying the Collider right away I left it for 0.25 seconds so I could get up to 2 shots in if I wanted to get a double spawn and hear a double explosion ( More fun!)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mark Bohuslav

Mark Bohuslav

Game Developer Intern at GameDevHQ