public static void CreateFaultLinkRenderers(Transform container, NodeWeb faultWeb, GameObject linkPrefab)
 {
     for (int i = 0; i < faultWeb.ConnectionCount; i++)
     {
         var newLink = Object.Instantiate(linkPrefab, container);
         newLink.name = "L" + i.ToString("D3") + " (" + faultWeb.Connections[i].A + ")(" + faultWeb.Connections[i].B + ")";
         newLink.GetComponent <FaultLinkRenderer>().SetNodes(faultWeb.Connections[i]);
     }
 }
    public void GenerateFaultWeb()
    {
        ClearFaultWeb();

        // Create Web
        faultWeb =
            NodeWebGenerator.GenerateWebPlane(
                new Vector2(
                    transform.localScale.x * planeSize,
                    transform.localScale.z * planeSize
                    ),
                nodeCountMin, nodeCountMax,
                nodeConnectionsMin, nodeConnectionsMax);

        // Create renderers for connections
        FaultLogic.CreateFaultLinkRenderers(connectionContainer, faultWeb, connectionPrefab);
    }
        public static void RunTest()
        {
            WalletData wallet = new Wallet()
                                .CreationDate(new DateTime(2018, 7, 4, 0, 0, 0, DateTimeKind.Utc))
                                .FolderPath("")
                                .Mnemonic("woman assume obscure neglect today real blue print wrap follow salad shadow")
                                .Name("test2")
                                .Network("StratisTest")
                                .Password("password")
                                .Create;

            NodeWeb nodeWeb = new NodeWeb();

            nodeWeb.Payload = FormatConvert.ObjToJSON(wallet);
            nodeWeb.Port    = "38221";
            nodeWeb.Path    = "api/Wallet/recover";
            nodeWeb.Host    = "localhost";
            nodeWeb.Request();
        }
 public void ClearFaultWeb()
 {
     connectionContainer.ClearChildren();
     faultWeb = null;
 }