EVERYTHING
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class OnPlayerLeftBehavior : NodeBehavior
|
||||
{
|
||||
private NodeGraphManager graph;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
graph = NodeGraphManager.Instance;
|
||||
if (graph != null)
|
||||
{
|
||||
graph.PlayerLeft += HandlePlayerLeft;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (graph != null)
|
||||
{
|
||||
graph.PlayerLeft -= HandlePlayerLeft;
|
||||
}
|
||||
}
|
||||
|
||||
private void HandlePlayerLeft(int actorNumber)
|
||||
{
|
||||
if (!(Node == null) && actorNumber > 0)
|
||||
{
|
||||
Node.TriggerRun("Left");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user