2023-12-11 16:53:44 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Gameplay.Common;
|
2023-12-13 16:20:41 +08:00
|
|
|
|
using Gameplay.Unit;
|
|
|
|
|
|
using Gameplay.Unit.Data;
|
2023-12-11 16:53:44 +08:00
|
|
|
|
namespace Gameplay.PlayerSkill.Logic
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 所有友军角色进入撤退状态
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class PlayerSkillLogic02 : PlayerSkillLogic01
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
protected override void _SearchUnits()
|
|
|
|
|
|
{
|
2023-12-14 18:25:52 +08:00
|
|
|
|
var allUnits = GameUnitManager.instance.infightUnits;
|
2023-12-11 16:53:44 +08:00
|
|
|
|
_selectUnits = new List<GameUnit>();
|
2023-12-14 18:25:52 +08:00
|
|
|
|
for (var i = 0; i < allUnits.count; ++i)
|
2023-12-11 16:53:44 +08:00
|
|
|
|
{
|
2023-12-14 18:25:52 +08:00
|
|
|
|
var unit = allUnits.GetByIndex(i);
|
2023-12-11 16:53:44 +08:00
|
|
|
|
// 只针对己方单位
|
|
|
|
|
|
if (unit.commonData.troopId != owner.playerUnit.commonData.troopId) continue;
|
|
|
|
|
|
// 只针对角色生效
|
|
|
|
|
|
if (unit.gameunitType != EGameUnitType.Character) continue;
|
|
|
|
|
|
|
|
|
|
|
|
_selectUnits.Add(unit);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|