Exemplo n.º 1
0
        public static UntilNode Allocate(System.Func <bool> condition)
        {
            UntilNode node = new UntilNode
            {
                Condition = condition,
            };

            return(node);
        }
Exemplo n.º 2
0
        private object UntilNode(UntilNode un)
        {
            object result = null;

            while (!((bool)Evaluate(un.i)))
            {
                result = Evaluate(un.body);
            }
            return(result);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 条件等待节点
 /// </summary>
 public static ITweenChain Until(this ITweenChain chain, System.Func <bool> condition)
 {
     return(chain.Append(UntilNode.Allocate(condition)));
 }