Ugh
I spent the whole day improving the new title screen falling blocks background because I wanted the direction they fall to be randomized to up, right, down, or left when the user enters the title screen. Unfortunately I ran into several bugs along the way.
Since the FallingBlock class had to be dynamic with the axis and direction for calculating the movement, I started using Point variables. Now for whatever reason, even though I set a FallingBlock's targetCoord:Point to the proper target coordinates each time it was added, if it was a recycled entity, its targetCoord would reset to the values assigned when first created. I eventually just instantiated targetCoord each time FallingBlock was added to the world.
Another tricky bug caused the addBlock() function to be called when it wasn't supposed to causing everything to be off balance. That one took too much time and effort to figure out.
But at least it's working now.
No comments:
Post a Comment