Esempio n. 1
0
    /// <summary>
    /// Actualiza los valores del jugador al iniciarse un turno.
    /// </summary>
    /// <param name="jugador">Jugador.</param>
    public void ActualizarValoresJugador(JugadorPartida jugador)
    {
        timer.StartTimer();

        ActivarBotonFinDeTurno(jugador);

        controladorJugador.ActualizarValoresJugador(jugador);
    }
Esempio n. 2
0
    public void StartTurn(Player player)
    {
        WhoseTurn = player;

        timer.StartTimer();
        GlobalSettings.Instance.EnableEndTurnButtonOnStart(player);
        TurnMaker turnMaker = WhoseTurn.GetComponent <TurnMaker>();

        turnMaker.OnTurnStart();
        if (turnMaker is PlayerTurnMaker)
        {
            WhoseTurn.HighlightPlayableCards();
        }
        WhoseTurn.OtherPlayer.HighlightPlayableCards(true);
    }
    public void setupPlayItemsScene()
    {
        PlayItemsEvent thisRound;
        GameManager    gm = GameManager.Instance;

        if (gm.currentEvent().type != TimelineEventType.PlayItems)
        {
            Debug.LogError("In PlayItemsManager but current event type is " + gm.currentEvent().type);
            return;
        }
        else
        {
            thisRound = gm.currentEvent() as PlayItemsEvent;
        }

        // Start the timer.
        RopeTimer timerScript = TimerContainer.GetComponent <RopeTimer>();

        timerScript.SetTimer(duration: (float)thisRound.duration);
        timerScript.StartTimer();
    }
Esempio n. 4
0
    public void StartChoosing()
    {
        hitBuyIt = false;
        chooseItemsAnnouncement.SetActive(true);
        if (GameManager.Instance.currentEvent().type == TimelineEventType.ChooseItems)
        {
            GameEvent thisRound = GameManager.Instance.currentEvent();
            loadBuyingPlayerFromEvent();
            loadSellingPlayersFromGameManager();
            carousel.initializeItems(Items);

            Debug.Log("Ending event after duration: " + thisRound.duration * 1.0f);
            rt.SetTimer(duration: (float)thisRound.duration);
            rt.StartTimer();
        }
        else
        {
            Debug.LogError("Attempt to startSelling, but current event type is " +
                           GameManager.Instance.currentEvent().type);
        }
    }
 // FOR TEST PURPOSES ONLY
 public void EndTurnTest()
 {
     timer.StopTimer();
     timer.StartTimer();
 }