private void Awake() { Paddle1.SetActive(false); Paddle2.SetActive(false); Ball.SetActive(false); Walls.SetActive(false); Texts.SetActive(false); Resetbtn.SetActive(false); }
private void StartGame() { Paddle1.SetActive(true); Paddle2.SetActive(true); Ball.SetActive(true); Walls.SetActive(true); Texts.SetActive(true); Startbtn.SetActive(false); Quitbtn.SetActive(false); }
// Use this for initialization void Start() { paddle = GameObject.FindObjectOfType <Paddle2>(); ballPaddleDiff = this.transform.position - paddle.transform.position; rb2d = GetComponent <Rigidbody2D>(); }
// Use this for initialization void Start() { paddle = GameObject.FindObjectOfType <Paddle2>(); paddleToBallVector = this.transform.position - paddle.transform.position; }