EVERYTHING
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class FreezePlayerBehavior : NodeBehavior
|
||||
{
|
||||
public override void OnRun(string inputPortName)
|
||||
{
|
||||
if (base.IsAuthoritative && string.Equals(inputPortName, "Freeze", StringComparison.Ordinal))
|
||||
{
|
||||
int inputPlayerId = GetInputPlayerId("Player");
|
||||
float seconds = Mathf.Max(0f, (float)GetInputNumber("Seconds"));
|
||||
NodePlayerFreezeRpc.Ensure()?.TryFreezePlayer(inputPlayerId, seconds);
|
||||
TriggerOutput("Done");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user