public void StartGame() { ball_x = 0; counter = 0f; btn_start.gameObject.SetActive(false); map.BuildMap(Random.Range(0f, 0f)); _ball = Instantiate(ball, map.PosBoll, Quaternion.identity) as GameObject; _ball.GetComponent <Ball>().gm = this; _ball.GetComponent <Ball>().rope = _rope; _ball.GetComponent <Ball>().Connect(new Vector3(0.3f, 1f, 0f)); ball_rb = _ball.GetComponent <Rigidbody>(); ball_x = _ball.transform.position.x; }