Пример #1
0
    IEnumerator StartPlayerTurn()
    {
        state = GameState.PLAYERTURN;
        OnPlayerTurnStart?.Invoke(this, EventArgs.Empty);
        while (cardManager.GetCardsInHand().Length < 5)
        {
            yield return(StartCoroutine(cardManager.DrawToHand()));
        }
        yield return(StartCoroutine(player.RefreshMana()));

        SetWaitForPlayer(true);
        Card[] cards = hand.GetCards();
        foreach (Card card in cards)
        {
            card.GetComponentInChildren <UIHoverSize>().enabled = true;
        }
        yield return(new WaitUntil(() => !waitForPlayer));

        foreach (Card card in hand.GetCards())
        {
            card.GetComponent <UIHoverSize>().enabled = false;
        }
        OnPlayerTurnEnd?.Invoke(this, EventArgs.Empty);
        yield return(StartCoroutine(StartEnemyTurn()));
    }
    void Player_OnTurnEnd(object sender, EventArgs e)
    {
        if (!ProcessEvents)
            return;

        OnPlayerTurnEnd?.Invoke(sender, e);
        Players.ToNextPlayer(ref _currentPlayerId);
        CurrentPlayer.ProcessTurnStart();
    }
Пример #3
0
 public void EndPlayerTurn()
 {
     player.EndTurn();
     OnPlayerTurnEnd?.Invoke();
     StartCoroutine(WaitForEnemyTurn());
 }
Пример #4
0
 public void Stay() => OnPlayerTurnEnd?.Invoke(handTotal);
Пример #5
0
 public void PlayerTurnEnd()
 {
     CardEffectExecutor.Instance?.CleaeModCard();
     nowState = BattleSceneState.PLAYER_TURN_END;
     OnPlayerTurnEnd?.Invoke(this, EventArgs.Empty);
 }
Пример #6
0
 protected virtual void OnTurnEnd()
 {
     OnPlayerTurnEnd?.Invoke();
 }