The command "randNumber" basically districts the program to a specific number the loop passes through. So, by changing this number, I can influence how frequently the cow speaks.
Three different melodies are stored in form of individual loops.
These loops are called at a certain number.
Example:
If randomNumber==30
mana();
So, if the number 30 is called out of the "randNumber", the loop/melody will start to play.
It is as simple as that and will hopefully help me with future projects.
No comments:
Post a Comment