I implemented the appropriate recordings to each part of the app. I also fixed the timer to fit our previous UI UML diagram specification of starting at 0 degrees and going anti clockwise. Now, when you run out of time, a voice will give you more time. You also get motivating music.
Fixing the Slowdown.
If you look at the previous build, you can see that when the timer appears, a lot of nodes are being added (shown at the bottom of the screen). This is because a red line is being drawn over the white circle every 6th of a second to make it look like a timer. Each line is a node. The problem was that as more nodes get added, the frames per second slows down and the app starts lagging.
To solve this, I remove all the red line nodes at each 90 degree filling. Then I show one of 3 timer .png pictures which are added at the appropriate times, and then the line nodes are drawn starting at that degree. This results in no app slowdown anymore.
Fixing the Slowdown.
If you look at the previous build, you can see that when the timer appears, a lot of nodes are being added (shown at the bottom of the screen). This is because a red line is being drawn over the white circle every 6th of a second to make it look like a timer. Each line is a node. The problem was that as more nodes get added, the frames per second slows down and the app starts lagging.
To solve this, I remove all the red line nodes at each 90 degree filling. Then I show one of 3 timer .png pictures which are added at the appropriate times, and then the line nodes are drawn starting at that degree. This results in no app slowdown anymore.
Blank circle picture.
Start drawing lines at 0 degrees until it reaches 90 degrees.
Start drawing lines at 0 degrees until it reaches 90 degrees.
Delete previous lines.
Show this 90 degrees picture.
Line starts drawing at 91 degrees - 180 degrees.
Show this 90 degrees picture.
Line starts drawing at 91 degrees - 180 degrees.
Delete previous lines.
Show this 180 degrees picture.
Line starts drawing at 181 degrees - 270 degrees.
Show this 180 degrees picture.
Line starts drawing at 181 degrees - 270 degrees.
Delete previous lines.
Show this 270 degrees.
Line starts drawing at 271 degrees.
Show this 270 degrees.
Line starts drawing at 271 degrees.
And once you reach 360 degrees. You get a blank circle picture and the red line drawing process repeats.