示例#1
0
 public CoroutineClass SetFinishFunction(Util.DelegateVoid1Param <CoroutineClass> func)
 {
     OnFinishFunction_param = func;
     if (!br)
     {
         RunFinishFunction();
     }
     return(this);
 }
示例#2
0
    public static T[] GetComponentsAndRun <T>(this Component g, Util.DelegateVoid1Param <T> func) where T : Component
    {
        var ls = g.GetComponents <T>();

        if (ls != null && ls.Length > 0)
        {
            foreach (var v in ls)
            {
                func(v);
            }
        }
        return(ls);
    }
示例#3
0
    void everyAnimationCompleted(Spine.TrackEntry t)
    {
        if (Mine != null)
        {
            //once ani end
            if (!Mine.loop)
            {
                Mine.skeleton.PoseWithAnimation(basic_animation, 0, true);
                Mine.AnimationName = basic_animation;
                Mine.loop          = true;
                Mine.Reload();
                Mine.state.Complete += everyAnimationCompleted;
            }

            //always call
            if (event_next_call != null)
            {
                event_next_call(this);
                event_next_call = null;
            }
        }
    }
示例#4
0
 public void WhenAnimationOver(Util.DelegateVoid1Param <scSpineRenderController> finish_run)
 {
     event_next_call += finish_run;
 }
示例#5
0
 public static TSource WhenRecycled <TSource>(this TSource from, Util.DelegateVoid1Param <TSource> action) where TSource : MonoBehaviour
 {
     from.VRunIfNotNull(f => f.GetComponent <scObjectPoolNode>().VRunIfNotNull(
                            node => node.WhenPoolDeath = () => action(node.GetComponent <TSource>())));
     return(from);
 }