Ejemplo n.º 1
0
 public static void EndRound(Game.Structure.RoundScore[] roundScores, int initiater)
 {
     endRound = true;
     TurnArrowController.TurnArrowOff();
     Game.Actors.ScoreBoard.UpdateScores(roundScores, initiater);
     ScoreBoard.Show(true);
 }
Ejemplo n.º 2
0
    public static void CleanTable()
    {
        TurnArrowController.TurnArrowOff();
        TrumpSelection.Hide();
        ScoreBoard.Hide();
        staticGameTable.SetGameState(Common.Enums.GameState.INLOBBY);
        Game.Actors.ScoreBoard.ResetScores();
        BiddingPopup.Hide();
        CurrentTrump.currentTrumpActive = false;
        UserInteraction.InputActive     = false;

        foreach (Transform card in GameObject.FindGameObjectWithTag("DECK").transform)
        {
            if (!card.name.Contains("Card"))
            {
                Destroy(card.gameObject);
            }
        }

        PlayedCardsController.Cards[0].gameObject.SetActive(false);
        PlayedCardsController.Cards[1].gameObject.SetActive(false);
        PlayedCardsController.Cards[2].gameObject.SetActive(false);
        PlayedCardsController.Cards[3].gameObject.SetActive(false);

        PlayedCardsController.playedCardCount = 0;
    }
Ejemplo n.º 3
0
 public override void AskForAction(ActionType actionType, object callbackObject, InfoDescription error)
 {
     this.callbackObject = callbackObject;
     unityPlayer.TurnTimeoutHandler.StartTurnTimer(this, actionType, callbackObject);
     if (error == InfoDescription.NoError)
     {
         //  NO ERROR
         HandleActionRequest(actionType);
         TurnArrowController.SetActive(GetPlayersSeat());
     }
     else
     {
         //  SHOW ERROR
         HandleError(error);
         HandleActionRequest(actionType);
         TurnArrowController.SetActive(GetPlayersSeat());
         LogManager.Log(error.ToString("G"));
     }
 }
Ejemplo n.º 4
0
    public override void AskForAction(ActionType actionType, object callbackObject, InfoDescription error)
    {
        unityComputer.TurnTimeoutHandler.StartTurnTimer(this, actionType, callbackObject);
        LogManager.Log(unityComputer.transform.name + " : " + actionType.ToString("G"));
        staticCallBackObject = callbackObject;

        if (error == InfoDescription.NoError)
        {
            //  NO ERROR
            TurnArrowController.SetActive(UIPlayer.GetRelativePlayerSeat(base.GetPlayersSeat()));
            awaitingAction = actionType;
            unityComputer.WaitForAction();
        }
        else
        {
            //  SHOW ERROR
            TurnArrowController.SetActive(UIPlayer.GetRelativePlayerSeat(GetPlayersSeat()));
            LogManager.Log(error.ToString());
        }
    }
Ejemplo n.º 5
0
    public static void ResetHand(int winner, UnityRound currentRound, Player winnerPlayer)
    {
        if (Properties.ActiveGameType == GameType.SinglePlayer)
        {
            destinationPosition = playerPositions[winner].position;
            destinationRotation = playerPositions[winner].rotation;
        }
        else
        {
            int networkWinnerSeat = LocalNetworkPlayer.GetRelativePlayerSeat(winner);
            destinationPosition = playerPositions[networkWinnerSeat].position;
            destinationRotation = playerPositions[networkWinnerSeat].rotation;
        }

        unityRound = currentRound;

        playedCardCount = 0;
        PlayedCardsController.awaitingWinner = winnerPlayer;

        moveCards = true;

        TurnArrowController.TurnArrowOff();
    }