예제 #1
0
        // Use this for initialization
        void Start()
        {
            Debug.Log(Time.frameCount);

            var delayFrameAction = DelayFrameAction.Allocate(1, () =>
            {
                Debug.Log(Time.frameCount);
            });

            this.ExecuteNode(delayFrameAction);

            this.DelayFrame(2, (() =>
            {
                Debug.Log(Time.frameCount);
            }));

            this.Sequence()
            .Event(() => Debug.Log(Time.frameCount))
            .DelayFrame(2)
            .Event(() => Debug.Log(Time.frameCount))
            .Begin();

            this.NextFrame(() =>
            {
                Debug.Log(Time.frameCount);
            });
        }
예제 #2
0
 public static IActionChain NextFrame(this IActionChain selfChain)
 {
     return(selfChain.Append(DelayFrameAction.Allocate(1)));
 }
예제 #3
0
 public static IActionChain DelayFrame(this IActionChain selfChain, int frameCount)
 {
     return(selfChain.Append(DelayFrameAction.Allocate(frameCount)));
 }
예제 #4
0
 public static void NextFrame <T>(this T selfBehaviour, System.Action nextFrameEvent)
     where T : MonoBehaviour
 {
     selfBehaviour.ExecuteNode(DelayFrameAction.Allocate(1, nextFrameEvent));
 }
예제 #5
0
 public static void DelayFrame <T>(this T selfBehaviour, int frameCount, System.Action delayFrameEvent)
     where T : MonoBehaviour
 {
     selfBehaviour.ExecuteNode(DelayFrameAction.Allocate(frameCount, delayFrameEvent));
 }