public static ActionBase Create(IAEScriptContext ctx) { var cube = ctx.GetTransform("$cube"); var sphere = ctx.GetTransform("$sphere"); var secondAEX = ctx.GetAEScript("$second_aex"); return (AE.Sequence( // Basic Tween sphere.AEScale(2f, 1f).SetEasing(Easings.BounceOut), AE.Parallel( cube.AEMove(new Vector3(0, -3, 0), 3.5f).SetEasing(Easings.BounceInOut), sphere.AEMove(new Vector3(0, 3, 0), 4.5f).SetEasing(Easings.ElasticOut) ), AE.Parallel( cube.AEMove(new Vector3(0, 3, 0), 2.5f).SetRelative(true).SetEasing(Easings.BackOut), sphere.AEMove(new Vector3(0, -3, 0), 3.5f).SetRelative(true).SetEasing(Easings.QuadOut) ), sphere.AEScale(1f, 1f).SetEasing(Easings.BounceOut), // Coroutine AE.WaitCoroutine(() => DelayCoroutine()), // Play another AEX secondAEX.Create(new Dictionary <string, object> { { "$duration", 10f } }), AE.Debug("All Completed!") )); }
public static ActionBase Create(IAEScriptContext ctx) { var sphere2 = ctx.GetTransform("$sphere_2"); var duration = ctx.GetFloat("$duration"); Debug.Log(duration); return (AE.Repeat( AE.Sequence( AE.Debug("playing SecondAEX"), sphere2.AEMove(new Vector3(-5, 0, 0), 1.5f).SetEasing(Easings.BackOut), sphere2.AEPath(duration, new Vector3(0, 5, 0), new Vector3(-5, 0, 0), new Vector3(-3, 2, 0), new Vector3(3, -2, 0), new Vector3(5, 0, 0), new Vector3(0, -5, 0) ) ) ).SetLoops(3)); }