public void ReloadSpawnPoint(int index) { GameObject go = Instantiate(cutLineObject, cutSpawnPoints[index], Quaternion.identity); CuttingLineScript line = go.GetComponent <CuttingLineScript>(); line.Initialize(cutDirections[index], cutVectorLengths[index], this, index); }
private void SpawnCutPoints() { for (int i = 0; i < cutSpawnPoints.Count; i++) { GameObject go = Instantiate(cutLineObject, cutSpawnPoints[i], Quaternion.identity); go.transform.SetParent(this.transform); CuttingLineScript line = go.GetComponent <CuttingLineScript>(); line.Initialize(cutDirections[i], cutVectorLengths[i], this, i); } }