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.
 

Latest posts

Trending Posts

Forum statistics

Threads
962,608
Messages
6,991,090
Members
3,164,878
Latest member
ecomranx32