// Use this for initialization void Start() { balloonConScr = balloonObj.GetComponent <balloonControler>(); spawnDistanceX = distanceToSpawn; for (int i = -10; i < 10; i++) { GameObject setBlockObj = Instantiate(platforms[0]) as GameObject; setBlockObj.name = "platform"; setBlockObj.transform.SetParent(this.transform); setBlockObj.transform.position = new Vector3(i * 3, -3.5f, 0); platformsObj.Add(setBlockObj); //give the last spawn Cordination lastaddedPlatform = setBlockObj; } }
void Start() { balCon = self.GetComponent <balloonControler>(); }
// Use this for initialization void Start() { balloonScr = balloonObj.GetComponent <balloonControler>(); }