Search Unity

How to make game like that ?

Discussion in 'Scripting' started by Eiseno, May 22, 2019.

  1. Eiseno

    Eiseno

    Joined:
    Nov 1, 2015
    Posts:
    81
    Hello guys,
    I want to make a game like this. When ball throw it will change color with an effect. And drop balls at end of level. How can i make an effect like this ?


    Best Regards
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    2,205
    Have each sphere track its neighbours. When the incoming projectile collides with a sphere, use a flood fill algorithm to recursively change the colours of itself and each neighbour as long as they match colours.

    https://en.wikipedia.org/wiki/Flood_fill