void AddTail() { SnakeTail tail = Instantiate(snakeTailPrefab, Vector3.zero, Quaternion.identity) as SnakeTail; tail.SetColor(color); tail.SetWidth(width); snakeTails.Add(tail); snakeCounter++; }
void AddTail() { SnakeTail tail = Instantiate(tailPrefab, Vector3.zero, Quaternion.identity) as SnakeTail; tail.SetColor(color); tail.SetWidth(width); tail.SetOffset((int)(width * 7)); // was 8 tail.transform.parent = map.transform; // optional, for convenience snakeTails.Add(tail); }