예제 #1
0
        public SetAndCheck()
        {
            Predicate = BehaviorProperty <bool> .Func(bb => {
                object value;
                if (Func != null)
                {
                    value = Func();
                }
                else
                {
                    value = FuncBlackboard(bb);
                }

                if (value == null)
                {
                    return(false);
                }

                bb.Set(Destination, value);
                return(true);
            });
        }
예제 #2
0
 public IsSet()
 {
     Predicate = BehaviorProperty <bool> .Func(bb => bb.Contains(Source) && bb.Get <object>(Source) != null);
 }
예제 #3
0
 public void SetFunc <T>(Func <Blackboard, T> value)
 {
     Set(BehaviorProperty <T> .Func(value));
 }