39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
using System.Collections.Generic;
|
||
using Cielonos.MainGame.Characters;
|
||
using UnityEngine;
|
||
|
||
namespace Cielonos.MainGame
|
||
{
|
||
public partial class BattleManager
|
||
{
|
||
public partial class EnemySubmodule
|
||
{
|
||
public CharacterBase GetNearestEnemy(List<CharacterBase> enemies)
|
||
{
|
||
CharacterBase nearestEnemy = enemies.Count > 0 ? enemies[0] : null;
|
||
return nearestEnemy;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取可被扰乱的敌人列表:
|
||
/// <para>目前获取的是本来不受到Disruption打断,但当前可以受到Disruption打断的敌人</para>
|
||
/// </summary>
|
||
public List<CharacterBase> GetDisruptableEnemies(List<CharacterBase> enemies,
|
||
BreakthroughType breakthroughType = BreakthroughType.Disruption)
|
||
{
|
||
List<CharacterBase> disruptableEnemies = new List<CharacterBase>();
|
||
|
||
foreach (CharacterBase enemy in enemies)
|
||
{
|
||
if (!enemy.reactionSc.breakthroughResistances[breakthroughType].Value &&
|
||
enemy.reactionSc.originalBreakthroughResistances[breakthroughType])
|
||
{
|
||
disruptableEnemies.Add(enemy);
|
||
}
|
||
}
|
||
|
||
return disruptableEnemies;
|
||
}
|
||
}
|
||
}
|
||
} |