Question by
Veerababu.g · Feb 08, 2016 at 05:19 AM ·
positioncollision detectionmatching
problem in match3 type game
hello......
there what am doing is if the color is matching neighbor one then am adding them into corresponding list for ex
observe red circle combination.......
there is 7 red circles are matched. am adding them into one list called redMathcedList.... like that am doing for all the circles.....
so finally 7red circles are added into my list ....... but i have to deffer them to destroy which having min 3 combination..............
how can i deffer them
candycrush.png
(13.5 kB)
Comment
Answer by Wrymnn · Feb 08, 2016 at 08:43 AM
Hi,
you can check if you have 3 or more red circles in your List, by using
if(redMathcedList.Count >= 3)
then you can destroy the red circles by calling
for(int i = 0; i < redMathcedList.Count; i++)
Object.Destroy(redMathcedList[i]);