public void GetTile(int id) { MyTile tile = CreateTile(); GetTileId(id); tile.Initialize(id); my_tiles.Add(tile); }
public void GetShowTile(int id) { GameObject g = Resources.Load("Prefabs/Tile") as GameObject; MyTile tile = Instantiate(g).GetComponent <MyTile>(); //GetTileId(id); tile.Initialize(id); show_tiles.Add(tile); }
public bool CheckThreeToFour(int id) { int count = 0; for (int i = 0; i < show_tiles.Count; i++) { if (show_tiles[i].tile_id == id) { count++; if (count >= 3) { MyTile temp = CreateTile(); temp.Initialize(id); show_tiles.Insert(i, temp); return(true); } } } return(false); }