private void Start() { adtimer = FindObjectOfType <AdTimer>(); // isOptionPannelActive = GameObject.FindGameObjectWithTag("ContinuePannel").GetComponent<NonRewardAdScript>(); // paddleToBallDistance = transform.position - paddle.transform.position; livesText.text = "Lives: " + lives; scoreText.text = "Score: " + currentScore; highScoreText.text = "High Score: " + "/n" + PlayerPrefs.GetInt("HighScore", 0).ToString(); if (Application.internetReachability != NetworkReachability.NotReachable) { Debug.Log("Network Cha"); // WatchAd(); Continue(); } else { Debug.Log("Network Chaina"); watchAdButton.GetComponent <Button>().enabled = false; watchAdButton.GetComponent <Image>().color = new Color(1, 1, 1, 0.5f); adtimer.countdownText.gameObject.SetActive(false); ContinueText.gameObject.SetActive(false); } }
private void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }