17 lines
373 B
C#
17 lines
373 B
C#
using UnityEngine;
|
|
|
|
[DisallowMultipleComponent]
|
|
public sealed class MeBehavior : NodeBehavior
|
|
{
|
|
public override void OnGraphUpdate()
|
|
{
|
|
int num = ResolveLocalPlayerId();
|
|
SetLocalOutputValueIfChanged("Player", (num > 0) ? BSValue.FromPlayer(num) : BSValue.None);
|
|
}
|
|
|
|
private static int ResolveLocalPlayerId()
|
|
{
|
|
return NodePlayerUtility.ResolveLocalPlayerId();
|
|
}
|
|
}
|