void Start() { Resources.UnloadUnusedAssets(); playAgainButton.SetActive(false); //Loads the user's high score if one exists if (File.Exists(Application.persistentDataPath + "/HighScore.dat")) { Load(); } ball = GameObject.Find("Ball"); ballScript = ball.GetComponent <BallScript>(); paddles[0] = GameObject.Find("Paddle1"); paddles[1] = GameObject.Find("Paddle2"); paddles[2] = GameObject.Find("Paddle3"); pScripts[0] = paddles[0].GetComponent <PaddleScript>(); pScripts[1] = paddles[1].GetComponent <PaddleScript>(); pScripts[2] = paddles[2].GetComponent <PaddleScript>(); goToOptions = GameObject.Find("GoToOptions"); powerupManager = gameObject.GetComponent <PowerHodling>(); canShoot = true; //Displays the high score if one exists if (highScore != 0) { highScoreText.text = "High Score: " + highScore; } objectSpawnerScript = GetComponent <ObjectSpawning>(); canSpawnPowers = false; }
// Use this for initialization void Start() { gameManagerScript = GameObject.Find("GameManager").GetComponent <GameManager>(); powerManager = GameObject.Find("GameManager").GetComponent <PowerHodling>(); }
void Start() { gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); gameManager.nextPaddle = GameObject.Find("Paddle2"); powerupManager = GameObject.Find("GameManager").GetComponent <PowerHodling>(); }