////////////////////////////////////////////////////////////////// // Use this for initialization public void Start() { Application.targetFrameRate = 60; pm = GetComponent <PaddleMaster>(); bm = GetComponent <BallMaster>(); ColorSwatch = this.gameObject.GetComponent <ColorSwatches>(); pm.PaddleUpgrade(score.getScore()); bm.InvokeBalls(); }
public void RestartGame() { //SCORE score.ResetScore(); score.showScore(); gameObject.GetComponent <HighScore>().canGetNewHighScore = true; //DELETE OLD PADDLE Destroy(GameObject.FindWithTag("Paddle")); ColorSwatch.ResetColors(); //CREATE NEW PADDLE pm.PaddleUpgrade(0); //SPAWN STUFF bm.InvokeBalls(); gameoverman.HideGameOverMenu(); }