Esempio n. 1
0
        public void TerminateNodes(IEnumerable <Guid> targetNodes)
        {
            HashSet <IEffectNode> nodes = new HashSet <IEffectNode>();

            foreach (var targetNode in targetNodes)
            {
                nodes.AddRange(CurrentEffects.Where(x => x.Effect.TargetNodes.Any(t => t.Id.Equals(targetNode))));
            }
            CurrentEffects.RemoveEffects(nodes);
        }
Esempio n. 2
0
        public void TerminateNode(Guid targetNode)
        {
            IEnumerable <IEffectNode> nodes = CurrentEffects.Where(x => x.Effect.TargetNodes.Any(t => t.Id.Equals(targetNode))).ToList();

            CurrentEffects.RemoveEffects(nodes);
        }
Esempio n. 3
0
 public IEnumerable <SideEffect> GetSideEffects()
 {
     return(CurrentEffects.Where(t => t is SideEffect).Cast <SideEffect>());
 }
Esempio n. 4
0
 public IEnumerable <PositiveEffect> GetPositiveEffects()
 {
     return(CurrentEffects.Where(e => e is PositiveEffect).Cast <PositiveEffect>());
 }