void Start() { GameObject spawnObject = GameObject.FindGameObjectWithTag("BallSpawn"); if (spawnObject != null) { ballSpawner = spawnObject.GetComponent <BallSpawnScript>(); } }
// Start is called before the first frame update void Start() { ballSpawnScript = GameObject.Find("BallSpawner").GetComponent <BallSpawnScript>(); opponentDirection = (transform.position.x / Mathf.Abs(transform.position.x)); }