コード例 #1
0
 public void SpecialAttackEnemy()
 {
     if (CheckIsEnemyIsNotNull)
     {
         GameLogicManager.Instance.EndPlayerTurn();
         var result = Player.SpecialAction(EnemyUtils.SelectedEnemy.Statistic);
         UI.AddLog(result);
         if (!EnemyUtils.SelectedEnemy.IsDead)
         {
             return;
         }
         EnemyIsDead(EnemyUtils.SelectedEnemy);
     }
 }
コード例 #2
0
        public void EnemyIsDead(Enemy selectedEnemy)
        {
            var builder = new StringBuilder();

            builder.AppendFormat("Enemy called {0} is now Dead, SHAME OF YOU! Great Job!! ",
                                 selectedEnemy.Statistic.Name);
            var experience = selectedEnemy.Statistic.Level * 10;

            Player.CurrentExperience += experience;
            builder.AppendFormat("\nYou receive {0} exp from {1}",
                                 experience, selectedEnemy.Statistic.Name);
            builder.AppendLine(Player.CalculateLvl());
            EnemyManager.Instance.KillEnemy(selectedEnemy);
            Player.KilledEnemies++;
            UI.AddLog(builder.ToString());
        }
コード例 #3
0
 public void AttackPlayer(Character enemy)
 {
     UI.AddLog(enemy.Attack(PlayerManager.Instance.Statistic));
 }