﻿using UnityEngine;
using System.Collections;
using ActionEngine;

public static class VeryAwesomeAEX {
	
	public static ActionBase Create (IAEScriptContext ctx) {
		var simpleAEX = ctx.GetAEScript("$simple");
		var cube = ctx.GetTransform("$cube");
		var sphere = ctx.GetTransform("$sphere");

		return
			AE.Sequence(
				AE.Parallel(
					// You can use another AEX
					simpleAEX.Create(),
					// Basic tweens
					cube.AEMove(new Vector3(0, -3, 0), 3.5f).Easing(Easings.BounceInOut),
					sphere.AEMove(new Vector3(0, 3, 0), 4.5f).Easing(Easings.ElasticOut)
                ),
				AE.Parallel(
					cube.AEMove(new Vector3(0, 3, 0), 2.5f).Relative(true).Easing(Easings.BackOut),
					sphere.AEMove(new Vector3(0, -3, 0), 3.5f).Relative(true).Easing(Easings.QuadOut)
				),
				AE.Delay(0.5f),
				AE.Debug("All Completed!")
			);
	}

}
﻿using ActionEngine;
using System.Collections;
using UnityEngine;

public static class VeryAwesomeAEX {

	public static ActionBase Create (IAEScriptContext ctx) {
		var simpleAEX = ctx.GetAEScript("$simple");
		var cube = ctx.GetTransform("$cube");
		var sphere = ctx.GetTransform("$sphere");

		return
			AE.Sequence(
				AE.Parallel(
					// You can use another AEX
					simpleAEX.Create(),

					// Basic tweens
					cube.AEMove(new Vector3(0, -3, 0), 3.5f).Easing(Easings.BounceInOut),
					sphere.AEMove(new Vector3(0, 3, 0), 4.5f).Easing(Easings.ElasticOut)
				),
				AE.Parallel(
					cube.AEMove(new Vector3(0, 3, 0), 2.5f).Relative(true).Easing(Easings.BackOut),
					sphere.AEMove(new Vector3(0, -3, 0), 3.5f).Relative(true).Easing(Easings.QuadOut)
				),
				AE.Coroutine(() => ExampleCoroutine()),
				AE.Debug("All Completed!")
			);
	}

	private static IEnumerator ExampleCoroutine () {
		Debug.Log("Coroutine Started: " + Time.time);
		yield return new WaitForSeconds(2f);
		Debug.Log("Coroutine End: " + Time.time);
	}

}

Add coroutine usage in AEX
Add coroutine usage in AEX
