How to Make Random color Bubbles?

  • Thread starter Thread starter AC Question
  • Start date Start date
A

AC Question

I want to make a Bubble tap game in Android (AS) I don't know how to make random color bubbles and If player tap the bubble it will burst and new bubble will appear.
 
Use the random() function to generate as many numbers as you have colors (16? 256? whatever you want.) When it's time to generate a bubble, call the function, get back a number, and use that number color (you'll have to assign a number to each color - a table would be easiest) to make the bubble.
 

Members online

Forum statistics

Threads
956,297
Messages
6,967,487
Members
3,163,512
Latest member
saramurphyu