// Start is called before the first frame update void Start() { _targetRB = GetComponent <Rigidbody>(); _targetRB.AddForce(RandForce(), ForceMode.Impulse); _targetRB.AddTorque(RandTorque(), RandTorque(), RandTorque(), ForceMode.Impulse); transform.position = RandSpawnPos(); _gameManager = GameObject.Find("Game Manager").GetComponent <U5GameManager>(); }
// Start is called before the first frame update void Start() { _button = GetComponent <Button>(); _button.onClick.AddListener(SetDifficulty); _u5gm = GameObject.Find("Game Manager").GetComponent <U5GameManager>(); }