public override NodeTreeOutput Tick(out ExecutionResult executionResult, ExecutionResult childResult) { int reps = repetitions.GetValue(); if (reps == -1 || repDone < reps) { repDone++; if (childResult == ExecutionResult.Success) { if (repDone == 0) { executionResult = ExecutionResult.StopExecutionAtMe; } else { executionResult = ExecutionResult.Running; } return(child); } else { executionResult = ExecutionResult.Failure; return(null); } } else { InterruptExecution(); executionResult = ExecutionResult.Success; return(null); } }
public override NodeTreeOutput Tick(out ExecutionResult executionResult, ExecutionResult childResult) { animator.GetValue().GetCurrentAnimatorClipInfo(animatorLayer.GetValue(), infos); var clip = animationClip.GetValue(); if (infos.Count > 0) { foreach (var info in infos) { if (info.clip == clip) { executionResult = ExecutionResult.StopExecutionAtMe; return(null); } } } executionResult = ExecutionResult.Success; return(child); }
public override void Calculate() { returnVar.value = (UnityEngine.Mathf.Min(a.GetValue(), b.GetValue())); }
public override void Calculate() { returnVar.value = (UnityEngine.Random.Range(min.GetValue(), max.GetValue())); }
public override void Calculate() { returnVar.value = (UnityEngine.LayerMask.LayerToName(layer.GetValue())); }