21 lines
337 B
C#
21 lines
337 B
C#
using UnityEngine;
|
|
|
|
[DisallowMultipleComponent]
|
|
public sealed class PulseBehavior : NodeBehavior
|
|
{
|
|
private bool previous;
|
|
|
|
public override void OnGraphUpdate()
|
|
{
|
|
if (base.IsAuthoritative)
|
|
{
|
|
bool flag = GetInputValue("Held").AsBool();
|
|
if (flag && !previous)
|
|
{
|
|
TriggerOutput("Pulse");
|
|
}
|
|
previous = flag;
|
|
}
|
|
}
|
|
}
|