How to Make Random color Bubbles?

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.
 

Rukbat

Retired Moderator
Feb 12, 2012
44,529
28
0
Visit site
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.
 

Trending Posts

Forum statistics

Threads
943,851
Messages
6,920,323
Members
3,159,259
Latest member
jamesselenla