31 lines
924 B
C#
31 lines
924 B
C#
using System.Collections.Generic;
|
|
using Gameplay.Common;
|
|
using Gameplay.Unit;
|
|
using Gameplay.Unit.Data;
|
|
namespace Gameplay.PlayerSkill.Logic
|
|
{
|
|
/// <summary>
|
|
/// 所有友军角色进入撤退状态
|
|
/// </summary>
|
|
public class PlayerSkillLogic02 : PlayerSkillLogic01
|
|
{
|
|
|
|
protected override void _SearchUnits()
|
|
{
|
|
var allUnits = GameUnitManager.instance.infightUnits;
|
|
_selectUnits = new List<GameUnit>();
|
|
for (var i = 0; i < allUnits.count; ++i)
|
|
{
|
|
var unit = allUnits.GetByIndex(i);
|
|
// 只针对己方单位
|
|
if (unit.commonData.troopId != owner.playerUnit.commonData.troopId) continue;
|
|
// 只针对角色生效
|
|
if (unit.gameunitType != EGameUnitType.Character) continue;
|
|
|
|
_selectUnits.Add(unit);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|