public static AddHackingDevice Send(GameObject player, GameObject hackObject, GameObject hackingDevice) { AddHackingDevice msg = new AddHackingDevice { Player = player.GetComponent <NetworkIdentity>().netId, HackableObject = hackObject.GetComponent <NetworkIdentity>().netId, HackingDevice = hackingDevice.GetComponent <NetworkIdentity>().netId }; msg.Send(); return(msg); }
public void AttemptAddDevice() { Pickupable handItem = PlayerManager.LocalPlayerScript.Equipment.ItemStorage.GetActiveHandSlot().Item; if (handItem != null) { HackingDevice hackDevice = handItem.GetComponent<HackingDevice>(); if (hackDevice != null) { AddHackingDevice.Send(PlayerManager.LocalPlayerScript.gameObject, hackProcess.gameObject, hackDevice.gameObject); } } }