public override void Process()
    {
        LoadMultipleObjects(new uint[] { Player, HackableObject });
        int[] connectionToAdd = JsonConvert.DeserializeObject <int[]>(JsonData);

        var playerScript = NetworkObjects[0].GetComponent <PlayerScript>();
        var hackObject   = NetworkObjects[1];
        HackingProcessBase hackingProcess = hackObject.GetComponent <HackingProcessBase>();

        if (hackingProcess.ServerPlayerCanAddConnection(playerScript, connectionToAdd))
        {
            hackingProcess.AddNodeConnection(connectionToAdd);
            HackingNodeConnectionList.Send(NetworkObjects[0], hackObject, hackingProcess.GetNodeConnectionList());
        }
    }
示例#2
0
    public override void Process()
    {
        LoadMultipleObjects(new uint[] { Player, HackableObject });
        int[] connectionToAdd = JsonConvert.DeserializeObject <int[]>(JsonData);

        var playerScript = NetworkObjects[0].GetComponent <PlayerScript>();
        var hackObject   = NetworkObjects[1];
        HackingProcessBase hackingProcess = hackObject.GetComponent <HackingProcessBase>();

        if (hackingProcess.ServerPlayerCanAddConnection(playerScript, connectionToAdd))
        {
            SoundManager.PlayNetworkedAtPos(SingletonSOSounds.Instance.WireMend, playerScript.WorldPos);
            hackingProcess.AddNodeConnection(connectionToAdd);
            HackingNodeConnectionList.Send(NetworkObjects[0], hackObject, hackingProcess.GetNodeConnectionList());
        }
    }