31 lines
904 B
C#
31 lines
904 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 = GameUnitMapper.Inst.unitList;
|
|
_selectUnits = new List<GameUnit>();
|
|
for (var i = 0; i < allUnits.Count; ++i)
|
|
{
|
|
var unit = allUnits[i];
|
|
// 只针对己方单位
|
|
if (unit.commonData.troopId != owner.playerUnit.commonData.troopId) continue;
|
|
// 只针对角色生效
|
|
if (unit.gameunitType != EGameUnitType.Character) continue;
|
|
|
|
_selectUnits.Add(unit);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|