Exemple #1
0
        private void UpdateExistingNodeGoData(GameObject nodeExistingGo, CdmNodeBtc nodeNewBtc)
        {
            GraphNodeBrain gnb = nodeExistingGo.GetComponent <GraphNodeBrain>();

            if (gnb != null)
            {
                gnb.CdmNodeBtc  = nodeNewBtc;
                gnb.NodeType    = nodeNewBtc.NodeType;
                gnb.ValueMBtc   = nodeNewBtc.FinalBalance;
                gnb.TotalEdges  = nodeNewBtc.NodeEdgeCountTotal;
                gnb.Id          = nodeNewBtc.NodeId;
                gnb.TxDate      = nodeNewBtc.CreateDate;
                gnb.BlockHeight = nodeNewBtc.BlockHeight;
                gnb.RelayedBy   = nodeNewBtc.RelayedBy;

                // Special case for first ever created node
                if (!GlobalData.Instance.FirstNodeCreatedYet)
                {
                    GlobalData.Instance.FirstNodeCreatedYet = true;
                    gnb.SetFirstEverCreated();
                }

                // Update UI text els with the new GraphNodeBrain values
                gnb.RefreshUI();
            }
        }