예제 #1
0
    void Start()
    {
        GameObject spawnObject = GameObject.FindGameObjectWithTag("BallSpawn");

        if (spawnObject != null)
        {
            ballSpawner = spawnObject.GetComponent <BallSpawnScript>();
        }
    }
예제 #2
0
 // 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));
 }