public CoroutineClass SetFinishFunction(Util.DelegateVoid1Param <CoroutineClass> func) { OnFinishFunction_param = func; if (!br) { RunFinishFunction(); } return(this); }
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); }
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; } } }
public void WhenAnimationOver(Util.DelegateVoid1Param <scSpineRenderController> finish_run) { event_next_call += finish_run; }
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); }