EVERYTHING
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Photon.Pun;
|
||||
using UnityEngine;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class GetPlayerCountBehavior : GuardedValueNodeBehavior
|
||||
{
|
||||
protected override void Start()
|
||||
{
|
||||
RecomputeCore();
|
||||
}
|
||||
|
||||
public override void OnGraphUpdate()
|
||||
{
|
||||
RecomputeCore();
|
||||
}
|
||||
|
||||
protected override void RecomputeCore()
|
||||
{
|
||||
int num = 0;
|
||||
num = ((!PhotonNetwork.InRoom) ? 1 : ((PhotonNetwork.CurrentRoom != null) ? PhotonNetwork.CurrentRoom.PlayerCount : 0));
|
||||
SetLocalOutputValueIfChanged("Count", BSValue.FromNumber(num));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user