Beispiel #1
0
    public void ServerEndTurn()
    {
        CurrentTurn++;
        if (CurrentTurn >= CardPlayer.ServerPlayers.Count)
        {
            CurrentTurn = 0;
        }

        CardPlayer current = CardPlayer.ServerPlayers[CurrentTurn];

        CurrentTurnClient = current.ClientID;

        Debug.Log("Next Turn Client ID: " + CurrentTurnClient + "\nTurnNumber: " + CurrentTurn);
        if (CardPlayer.LocalPlayer != null)
        {
            CardPlayer.LocalPlayer.EnableInteractions = CardPlayer.LocalPlayer.ClientID == CurrentTurnClient;
        }
        MapTransformInfo.Instance.SocketManager.SetTurn(CurrentTurnClient);
        RpcBroadcastEndTurn(CurrentTurnClient);

        current.DrawCard(1);         //Next player is drawing one card
    }