コード例 #1
0
    public void GameStart()
    {
        gameControllerScript.gameStart = true;
        CatSelect.SetActive(false);
        PigSelect.SetActive(false);
        BearSelect.SetActive(false);
        PandaSelect.SetActive(false);
        background.SetActive(false);
        selectChar.SetActive(false);
        Logo.SetActive(false);
        scoreScript.score = 0;

        Plank.GetComponent <Rigidbody2D>().freezeRotation = false;

        projectileScriptv2.launched = true;

        GameStarter.SetActive(false);
    }
コード例 #2
0
    public void Replay()
    {
        CatSelect.SetActive(true);
        PigSelect.SetActive(true);
        BearSelect.SetActive(true);
        PandaSelect.SetActive(true);
        background.SetActive(true);
        selectChar.SetActive(true);
        Logo.SetActive(true);
        scoreText2.enabled = false;

        gameControllerScript.timeLeft = 60;
        ReplayButton.SetActive(false);

        Plank.GetComponent <Rigidbody2D>().rotation       = 0f;
        Plank.GetComponent <Rigidbody2D>().freezeRotation = true;
        Plank.GetComponent <Rigidbody2D>().velocity       = new Vector2(0, 0);

        /*gameControllerScript.gameStart = true;
         * gameControllerScript.timeLeft = 10;
         * gameControllerScript
         * ReplayButton.SetActive(false);
         */
    }