private float spaceBetweenSquares = 2.5f; // the distance between the centers of squares on the game board void Start() { rb = GetComponent <Rigidbody>(); gameManagerX = GameObject.Find("Game Manager").GetComponent <GameManagerX>(); //transform.position = RandomSpawnPosition(); StartCoroutine(RemoveObjectRoutine()); // begin timer before target leaves screen }
// Start is called before the first frame update void Start() { gameManagerX = GameObject.Find("Game Manager").GetComponent <GameManagerX>(); button = GetComponent <Button>(); button.onClick.AddListener(SetDifficulty); }