Пример #1
0
    public void RpcChangePhase(int phase)
    {
        if (roundManager.curPhase != null)
        {
            int newPhase;
            switch ((roundManager.currentPhase)phase)
            {
            default:
                newPhase = phase - 1;
                break;

            case roundManager.currentPhase.target:
                newPhase = (int)roundManager.currentPhase.showcase;
                break;

            case roundManager.currentPhase.tiebreaker:
                newPhase = (int)roundManager.currentPhase.vote;
                break;

            case roundManager.currentPhase.showcase:
                newPhase = (int)roundManager.currentPhase.tiebreaker;
                break;
            }
            // Set accurate phase and finish the previous one.
            roundManager.setPhaseByID((roundManager.currentPhase)(newPhase));
            roundManager.curPhase.onFinishPlayer();
        }
        round_Manager.setPhase((roundManager.currentPhase)phase);
    }