Пример #1
0
 public void PlayerAttacks(UserAttackChoice userAttackChoice)
 {
     _UserAttackChoice = userAttackChoice;
     Attack(userAttackChoice.attackingPlayer, userAttackChoice.defenderPlayer);
     if (userAttackChoice.IsDefenderDead())
     {
         DefenderDies(userAttackChoice.defenderPlayer);
     }
     else
     {
         isTeamOnePlaying = !isTeamOnePlaying;
     }
 }
Пример #2
0
        private void PlayerAttack(Character player1, Character player2, string attacjType)
        {
            UserAttackChoice attackChoice = new UserAttackChoice();

            attackChoice.attackingPlayer  = player1;
            attackChoice.defenderPlayer   = player2;
            attackChoice.playerAttackType = attacjType;

            CurrentFight.PlayerAttacks(attackChoice);
            RemoveCharacter();

            if (CurrentFight.WinnerTeam != null)
            {
                DisplayWinner();
            }
            ActivatePlayingTeam();
        }