// Start is called before the first frame update void Start() { button = GetComponent <Button>(); button.onClick.AddListener(SetDifficulty); gameManager = GameObject.Find("Game Manager").GetComponent <GameManagerCH5>(); }
// Start is called before the first frame update void Start() { targetRb = GetComponent <Rigidbody>(); targetRb.AddForce(RandomForce(), ForceMode.Impulse); targetRb.AddTorque(RandomTorque(), RandomTorque(), RandomTorque(), ForceMode.Impulse); transform.position = RandomSpawnPos(); gameManager = GameObject.Find("Game Manager").GetComponent <GameManagerCH5>(); }