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(); }
public void EndPlayerTurn() { player.EndTurn(); OnPlayerTurnEnd?.Invoke(); StartCoroutine(WaitForEnemyTurn()); }
public void Stay() => OnPlayerTurnEnd?.Invoke(handTotal);
public void PlayerTurnEnd() { CardEffectExecutor.Instance?.CleaeModCard(); nowState = BattleSceneState.PLAYER_TURN_END; OnPlayerTurnEnd?.Invoke(this, EventArgs.Empty); }
protected virtual void OnTurnEnd() { OnPlayerTurnEnd?.Invoke(); }