public override void OnEnable() { base.OnEnable(); if (!IsServer && hackProcess != null) { RequestHackingNodeConnections.Send(PlayerManager.LocalPlayerScript.gameObject, hackProcess.gameObject); } }
public static RequestHackingNodeConnections Send(GameObject player, GameObject hackObject) { RequestHackingNodeConnections msg = new RequestHackingNodeConnections { Player = player.GetComponent <NetworkIdentity>().netId, HackableObject = hackObject.GetComponent <NetworkIdentity>().netId, }; msg.Send(); return(msg); }
void Start() { if (Provider != null) { hackProcess = Provider.GetComponentInChildren <HackingProcessBase>(); hackProcess.RegisterHackingGUI(this); if (hackProcess.isClient && PlayerManager.LocalPlayer != null) { RequestHackingNodeConnections.Send(PlayerManager.LocalPlayer, hackProcess.gameObject); } } }