Exemplo n.º 1
0
    private void DefineDeltaRoute()
    {
        //if a pair of them towards A1 or B1 are set that means yeas we found a middle point
        //for each that can ponteatlly be used to create route
        if ((_lastGoodA1FromA != new Vector3() && _lastGoodA1FromB != new Vector3()))
        {
            _deltaRoute = new DeltaRoute(_a, _b, _lastGoodA1FromA, _lastGoodA1FromB);

            //  _person.DebugList.Add(UVisHelp.CreateText(_lastGoodA1FromA, "_lastGoodA1FromA"));
            // _person.DebugList.Add(UVisHelp.CreateText(_lastGoodA1FromB, "_lastGoodA1FromB"));
        }
        else if (_lastGoodB1FromA != new Vector3() && _lastGoodB1FromB != new Vector3())
        {
            /*DefineDeltaRoute() somehting is not working fine.
             * //if a river is on middle should never have 2 points with good on the same side
             *
             * The problem with river freezing will give one point on first if. and 2 in this one.
             * Whit a river onmiddle ... so tht is bugg... I fixed with addressing the infinite loop.
             * But this still need to be fixed
             */
            _deltaRoute = new DeltaRoute(_a, _b, _lastGoodB1FromA, _lastGoodB1FromB);

            //_person.DebugList.Add(UVisHelp.CreateText(_lastGoodB1FromA, "_lastGoodB1FromA"));
            //  _person.DebugList.Add(UVisHelp.CreateText(_lastGoodB1FromB, "_lastGoodB1FromB"));
        }
        else
        {
            _isDeltaRoutable = false;
        }
    }
Exemplo n.º 2
0
    private void ClearOldVars()
    {
        DebugDestroy();

        _isDeltaRoutable = true;
        currentCheck     = H.None;
        _deltaRoute      = new DeltaRoute();
        _deltaRoute.Points.Clear();

        _lastGoodA1FromA = new Vector3();
        _lastGoodA1FromB = new Vector3();

        _lastGoodB1FromA = new Vector3();
        _lastGoodB1FromB = new Vector3();
    }