Esempio n. 1
0
        public virtual bool ConnectTo(int n, NavMesh2DConnection.ConnectionType connectionType)
        {
            Init();

            if (!ConnectedTo(n))
            {
                connectionsHashed.Add(n);
                NavMesh2DConnection newConnection = new NavMesh2DConnection();

                newConnection.connectedNodeIndex = n;
                newConnection.connectionType = connectionType;
                connections.Add(newConnection);
                return true;
            }

            return false;
        }
Esempio n. 2
0
        public virtual bool ConnectTo(int n, NavMesh2DConnection.ConnectionType connectionType)
        {
            Init();

            if (!ConnectedTo(n))
            {
                connectionsHashed.Add(n);
                NavMesh2DConnection newConnection = new NavMesh2DConnection();

                newConnection.connectedNodeIndex = n;
                newConnection.connectionType     = connectionType;
                connections.Add(newConnection);
                return(true);
            }

            return(false);
        }