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