16 lines
445 B
C#
16 lines
445 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[DisallowMultipleComponent]
|
|
public sealed class EventBehavior : NodeBehavior
|
|
{
|
|
public override void OnRun(string inputPortName)
|
|
{
|
|
if (string.Equals(inputPortName, "In", StringComparison.Ordinal))
|
|
{
|
|
((NodeGraphManager.Instance != null) ? NodeGraphManager.Instance.GetComponent<NodeGraphPhotonSync>() : null)?.BroadcastEventRun((Node != null) ? Node.NodeId : 0, "Out");
|
|
TriggerOutput("Out");
|
|
}
|
|
}
|
|
}
|