public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { var agent = new GameObject().AddComponent <RotateAgent>(); agent.target = transform; agent.relativeTo = relativeTo; agent.axis = axis; agent.degrees = degrees; agent.seconds = seconds; agent.easing = easing; agent.ignoreTimeScale = ignoreTimeScale; agent.Move(); if (waitUntilDone) { while (!Util.IsNull(agent)) { yield return(new WaitForUpdate()); } } transformOut = transform; yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { yield return(new WaitForSeconds(seconds)); yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override void Eval(GraphScope scope) { switch (type) { case TimeType.DeltaTime: delta = Time.deltaTime; break; case TimeType.UnscaledDeltaTime: delta = Time.unscaledDeltaTime; break; case TimeType.SmoothDeltaTime: delta = Time.smoothDeltaTime; break; case TimeType.SecondsSinceGameStart: delta = Time.time; break; case TimeType.UnscaledSecondsSinceGameStart: delta = Time.unscaledTime; break; } }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { transform.localScale = scale; transformOut = transform; yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { transform.Translate(meters * delta, relativeTo); transformOut = transform; deltaOut = delta; yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { transform.RotateAround(point, axis, degrees * delta); transformOut = transform; deltaOut = delta; yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { if (condition) { yield return(new SignalSocket(scope, GetSocket("execTrue"))); } else { yield return(new SignalSocket(scope, GetSocket("execFalse"))); } }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { if (immediate) { DestroyImmediate(toDestroy, false); } else { Destroy(toDestroy, seconds); } yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { while (condition) { // Create a copy of the scope to force re-eval every time this // loops var newScope = new GraphScope(scope); yield return(new SignalSocket(newScope, GetSocket("execTrue"))); // Force re-evaluation of this node Eval(scope); } }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { if (relativeTo == Space.Self) { transform.localRotation = Quaternion.Euler(rotation); } else { transform.rotation = Quaternion.Euler(rotation); } transformOut = transform; yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { switch (severity) { case LogType.Info: Debug.Log(message, context); break; case LogType.Warning: Debug.LogWarning(message, context); break; case LogType.Error: Debug.LogError(message, context); break; } yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { if (to.FieldName == "open") { isOpen = true; } else if (to.FieldName == "close") { isOpen = false; } else if (isOpen) { yield return(new SignalSocket(scope, GetSocket("execOut"))); } else { yield return(null); } }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { if (!Util.IsNull(transform)) { childTransform = transform.Find(childName); } else { childTransform = null; } if (!Util.IsNull(childTransform)) { childGameObject = childTransform.gameObject; } else { childGameObject = null; } yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public static GremlinQuery SkipTake(this GremlinQuery queryBase, GraphScope scope, int skip, int take) { return(queryBase.Range(scope, skip, skip + take)); }
public override void Eval(GraphScope scope) { result = Mathf.LerpAngle(a, b, t); }
public override void Eval(GraphScope scope) { result = Mathf.Clamp(f, min, max); }
public static GremlinQuery Tail(this GremlinQuery queryBase, GraphScope scope, int last) { return(new ComposedGremlinQuery(queryBase, $"tail({scope.ToString().ToLower()},{last})")); }
public static GremlinQuery Skip(this GremlinQuery queryBase, GraphScope scope, int itemsToSkip) { return(queryBase.Range(scope, itemsToSkip, -1)); }
public static GremlinQuery Range(this GremlinQuery queryBase, GraphScope scope, int lowEnd, int highEnd) { return(new ComposedGremlinQuery(queryBase, $".range({scope.ToString().ToLower()},{queryBase.ComposeParameter(lowEnd)},{queryBase.ComposeParameter(highEnd)})")); }
public static GremlinQuery Skip(this GremlinQuery queryBase, GraphScope scope, int itemsToSkip) { return(new ComposedGremlinQuery(queryBase, $".skip({scope.ToString().ToLower()},{itemsToSkip})")); }
public static GremlinQuery Range(this GremlinQuery queryBase, GraphScope scope, int itemsToSkip, int itemsToInclude) { return(new ComposedGremlinQuery(queryBase, $".range({scope.ToString().ToLower()},{itemsToSkip},{itemsToInclude})")); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { spawned = Instantiate(spawn); yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public static GremlinQuery Limit(this GremlinQuery queryBase, GraphScope scope, int items) { return(new ComposedGremlinQuery(queryBase, $".limit({scope.ToString().ToLower()},{items})")); }
public SignalSocket(GraphScope scope, Socket socket) { this.scope = scope; this.socket = socket; }
public override void Eval(GraphScope scope) { result = Mathf.SmoothStep(a, b, t); }
public override IEnumerator <Yield> Exec (Socket from, Socket to, GraphScope scope) { behaviour.enabled = enable; yield return(new SignalSocket(scope, GetSocket("execOut"))); }
public override void Eval(GraphScope scope) { result = l - r; }
public override void Eval(GraphScope scope) { result = Mathf.Log(f, p); }
public override void Eval(GraphScope scope) { result = Mathf.Tan(f); }
public override void Eval(GraphScope scope) { result = Mathf.Atan2(y, x); }