コード例 #1
0
    /// <summary>
    /// reset variables back to state
    /// </summary>
    public void ResetGame()
    {
        //reset round count
        roundNumber = 1;

        //Get rid of the red/blue wins
        winText.GetComponent <SpriteRenderer>().enabled = false;
        winTint.GetComponent <SpriteRenderer>().enabled = false;

        //set the timer to the build time
        timer = buildTime;

        //reset the health of the players.
        playerOne.GetComponent <Player>().ResetHealth();
        playerTwo.GetComponent <Player>().ResetHealth();

        platformManager.LoadInitialLevel();
        platformManager.GameReset();

        //Set the phase to build
        state = GameState.building;
        roundUI.SetActive(true);

        Spiked = false;

        BeginPickingPhase();
    }