コード例 #1
0
        public void UpdateNode(Node node)
        {
            int hash = node.GetHashCode();

            if (!_networkNodes.ContainsKey(hash))
            {
                _networkNodes.Add(hash, node);
            }
            else if (node.CompareLayer(_networkNodes[hash]) >= 0)
            {
                //UnityEngine.Debug.LogError("Already exists: " + hash + ", " + node.NetworkPosition);
                _networkNodes[hash] = node;
            }
        }