private List <IWorldPositionable> Execute_GetKaijus(AIBehaviorTree aiBehaviorTree, Army army, IGameService gameService, List <IWorldPositionable> unfilteredTargetList) { List <IWorldPositionable> list = new List <IWorldPositionable>(); for (int i = 0; i < unfilteredTargetList.Count; i++) { Kaiju kaiju = null; if (unfilteredTargetList[i] is Kaiju) { kaiju = (unfilteredTargetList[i] as Kaiju); } else if (unfilteredTargetList[i] is KaijuArmy) { kaiju = (unfilteredTargetList[i] as KaijuArmy).Kaiju; } else if (unfilteredTargetList[i] is KaijuGarrison) { kaiju = (unfilteredTargetList[i] as KaijuGarrison).Kaiju; } if (kaiju != null) { if (this.TypeOfTarget == AIBehaviorTreeNode_Decorator_SelectTarget.TargetType.StunnedKaiju && !kaiju.IsTamed() && kaiju.IsStunned()) { list.Add(kaiju); } if (this.TypeOfTarget == AIBehaviorTreeNode_Decorator_SelectTarget.TargetType.WildKaiju && !kaiju.IsTamed() && kaiju.IsWild()) { list.Add(kaiju); } if (this.TypeOfTarget == AIBehaviorTreeNode_Decorator_SelectTarget.TargetType.TamedKaiju && kaiju.IsTamed()) { list.Add(kaiju); } } } return(list); }