Search Unity

how can ı make multiple blasting ?

Discussion in 'Scripting' started by ernakgl, Jun 25, 2019.

  1. ernakgl

    ernakgl

    Joined:
    Oct 9, 2018
    Posts:
    21
    I want to make like this game but ı need to find best way for multiple detect color.
     
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    Every barrel in the setup have 6 ajanced barrel. Save neighbor list for every barrel and check all neighbors colors if match.
     
    ernakgl likes this.
  3. ernakgl

    ernakgl

    Joined:
    Oct 9, 2018
    Posts:
    21
    Should ı use a array or collision detect ? for neighbor
     
  4. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    Array. Use collision detection when environment have a lot of variations or totally unknown. Here's your scene contains only barrels on top each other in precalculated positions so you can easily fill in all neighbors array while generating or loading the level.