17 lines
430 B
C#
17 lines
430 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[DisallowMultipleComponent]
|
|
public sealed class UnfreezePlayerBehavior : NodeBehavior
|
|
{
|
|
public override void OnRun(string inputPortName)
|
|
{
|
|
if (base.IsAuthoritative && string.Equals(inputPortName, "Unfreeze", StringComparison.Ordinal))
|
|
{
|
|
int inputPlayerId = GetInputPlayerId("Player");
|
|
NodePlayerFreezeRpc.Ensure()?.TryUnfreezePlayer(inputPlayerId);
|
|
TriggerOutput("Done");
|
|
}
|
|
}
|
|
}
|