EVERYTHING
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class ForBehavior : NodeBehavior
|
||||
{
|
||||
public override void OnRun(string inputPortName)
|
||||
{
|
||||
if (string.Equals(inputPortName, "In", StringComparison.Ordinal))
|
||||
{
|
||||
int num = Mathf.RoundToInt((float)GetInputNumber("From"));
|
||||
int num2 = Mathf.RoundToInt((float)GetInputNumber("To"));
|
||||
int num3 = ((num <= num2) ? 1 : (-1));
|
||||
for (int i = num; (num3 > 0) ? (i <= num2) : (i >= num2); i += num3)
|
||||
{
|
||||
SetOutputValueIfChanged("Index", BSValue.FromNumber(i));
|
||||
TriggerOutput("Each");
|
||||
}
|
||||
TriggerOutput("Done");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user