EVERYTHING
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class OnceBehavior : NodeBehavior
|
||||
{
|
||||
private bool fired;
|
||||
|
||||
public override void OnRun(string inputPortName)
|
||||
{
|
||||
if (base.IsAuthoritative)
|
||||
{
|
||||
if (string.Equals(inputPortName, "Reset", StringComparison.Ordinal))
|
||||
{
|
||||
fired = false;
|
||||
}
|
||||
else if (string.Equals(inputPortName, "In", StringComparison.Ordinal) && !fired)
|
||||
{
|
||||
fired = true;
|
||||
TriggerOutput("Out");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user