18 lines
363 B
C#
18 lines
363 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[DisallowMultipleComponent]
|
|
public sealed class SequenceBehavior : NodeBehavior
|
|
{
|
|
private int index;
|
|
|
|
public override void OnRun(string inputPortName)
|
|
{
|
|
if (base.IsAuthoritative && string.Equals(inputPortName, "Next", StringComparison.Ordinal))
|
|
{
|
|
index = (index + 1) % 6;
|
|
TriggerOutput($"Out {index + 1}");
|
|
}
|
|
}
|
|
}
|