Exemplo n.º 1
0
    //////////////////////////////////////////////////////////////////

    // 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();
    }
Exemplo n.º 2
0
    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();
    }