Search Unity

How to make a match three game like Puzzle Bobble.

Discussion in 'Editor & General Support' started by NidoAnxari, Jun 15, 2017.

  1. NidoAnxari

    NidoAnxari

    Joined:
    Jan 2, 2017
    Posts:
    86
    I can figure out all the mechanics of the game but the problem is that how can I check if there are three same-colored balls are adjacent to each other. I've thought all the ways but couldn't get a reasonable solution. Can someone solve me this problem?
     
  2. CaptainTPK

    CaptainTPK

    Joined:
    Mar 28, 2017
    Posts:
    44
  3. NidoAnxari

    NidoAnxari

    Joined:
    Jan 2, 2017
    Posts:
    86
  4. NidoAnxari

    NidoAnxari

    Joined:
    Jan 2, 2017
    Posts:
    86
    Idea I came up last night was to check if the object next to another object is of same color. If so, then add it in a list. After that check the list if is larger than three. If so then destroy each Gameobject in it and also empty the list.
    How is this idea?
     
    theANMATOR2b likes this.