Add missing script part

This commit is contained in:
nlitkowski 2021-12-20 10:25:40 +01:00
parent 7f678a1a36
commit 49a5cc915e

View File

@ -130,22 +130,14 @@ public class Main : MonoBehaviour
randomShiftZ = random.Next(0, maxShiftValue); randomShiftZ = random.Next(0, maxShiftValue);
if (tree.name.StartsWith("AS") || tree.name.StartsWith("EU")) if (tree.name.StartsWith("AS") || tree.name.StartsWith("EU"))
{
if (tree.name.StartsWith("AS"))
{ {
renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector))); renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector)));
} }
else else
{ {
renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVectorShiftX))); GameObject bigTree = Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector));
} bigTree.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f);
renderedTrees.Add(bigTree);
}
else
{
GameObject duzySKurwol = Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector));
duzySKurwol.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f);
renderedTrees.Add(duzySKurwol);
} }
} }
} }