コード例 #1
0
    /// <summary>
    /// Moving from the build phase we, handle the externals of the build phase, give the players control over their characters, and swap sides.
    /// </summary>
    private void BeginSurvivalPhase()
    {
        platformManager.GameStateSurvival();

        roundUI.SetActive(false);

        //place the currently selected item if there is one
        if (p1Cursor.GetComponent <StoreObjectToBuild>().obj != null)
        {
            platformManager.PlaceObject(p1Cursor);
            SetCycleStates(1);
        }
        if (p2Cursor.GetComponent <StoreObjectToBuild>().obj != null)
        {
            platformManager.PlaceObject(p2Cursor);
            SetCycleStates(2);
        }

        //deactivate the cursors
        p1Cursor.SetActive(false);
        p2Cursor.SetActive(false);

        //enable the players
        //playerOne.GetComponent<Player>().enabled = true;
        //playerTwo.GetComponent<Player>().enabled = true;

        //Swaps the players
        SetPlayers();

        state = GameState.survival;
    }