void Update() { /* if (player.transform.position.x < leftBoundary) * player.transform.position = new Vector3 (leftBoundary, player.transform.position.y, player.transform.position.z); * * if (player.transform.position.x > rightBoundary) * player.transform.position = new Vector3 (rightBoundary, player.transform.position.y, player.transform.position.z); */ keyCounter.text = keys + "/" + totalKeys; coinCounter.text = coins + "/" + totalCoins; if (player.gameOver) { GameOver(); } if (gameOverMenu.activeSelf) { UpdateRevives(); } if (ds.revives == 0 && UnityAds.AdAvailable()) { watchAd.interactable = true; } else { watchAd.interactable = false; } if (ds.revives > 0) { revive.interactable = true; } else { revive.interactable = false; } if (player.victory) { Victory(); } }