EVERYTHING
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class RandomBehavior : NodeBehavior
|
||||
{
|
||||
public override void OnRun(string inputPortName)
|
||||
{
|
||||
if (base.IsAuthoritative && string.Equals(inputPortName, "Roll", StringComparison.Ordinal))
|
||||
{
|
||||
SetOutputValueIfChanged("Value", BSValue.FromNumber(UnityEngine.Random.value));
|
||||
TriggerOutput("Rolled");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user