Search Unity

Unity Grid Patterns

Discussion in '2D' started by ninjazippy, Dec 15, 2014.

  1. ninjazippy

    ninjazippy

    Joined:
    Jul 15, 2014
    Posts:
    2
    Hello, I was working on a puzzle game that utilises grids, similar to Bejeweled. I need an algorithm that will fill the cells with 2 textures. For example, the starting cell will have a dark texture and the one next to it will have a light texture. Just like a checker board.

    I tried with a forloop with no success and if you want me to post it, I am happy to.
     
  2. Ilingis

    Ilingis

    Joined:
    Dec 13, 2012
    Posts:
    63
    You could do a for loop where every cell has a distance of 2. The white cells would start at Vector2(0, 0) coordinates and the black ones at Vector2(1,1).