Flappy Pig – Obstacle Gapping, Coin Pickup, and Coin Spawning
Day 084 #100DaysOfCode
Day 048 #100DaysOfGameDev
Obstacle Gaps
- added variable in PostPool to determine the gap between last post and current post
- if gap exceeds the minimum required, spawns in a new post
Coin Pickup
- created a new script to determine if a collision with a coin is made
- upon collision, the score is updated and the coin is destroyed
Coin Spawn
- created a new script to handle the spawning of new coins
- set minimum time between spawns
- use random X and Y parameters (within a range) as the spawn point