12 lines
314 B
C#
12 lines
314 B
C#
using UnityEngine;
|
|
|
|
[DisallowMultipleComponent]
|
|
public sealed class GetPlayerByNumberBehavior : NodeBehavior
|
|
{
|
|
public override void OnGraphUpdate()
|
|
{
|
|
int num = Mathf.RoundToInt((float)GetInputNumber("Number"));
|
|
SetLocalOutputValueIfChanged("Player", (num > 0) ? BSValue.FromPlayer(num) : BSValue.None);
|
|
}
|
|
}
|