public BT_While(BT_Node _c, BT_Node _p, IfEvent _e) { children = new List <BT_Node>(); children.Add(_c); parent = _p; condition = _e; }
protected IfEvent UnityEvent2IfEvent(UnityEngine.Events.UnityEvent e) { object target = e.GetPersistentTarget(0); Type t = target.GetType(); System.Reflection.MethodInfo mi = t.GetMethod(e.GetPersistentMethodName(0)); IfEvent ie = () => { object o = mi.Invoke(target, new object[] {}); return((bool)o); }; return(ie); }
virtual public void SetCondition(IfEvent _e) { condition = _e; }