Пример #1
0
    public virtual void ReturnHome()
    {
        List <Node> entrances = Origin.CheckAdjRoads();

        if (entrances.Count == 0)
        {
            Kill();
            return;
        }
        Path = FindPath(new Node(this), entrances[0]);

        if (Path.Count == 0)
        {
            Kill();
        }

        ReturningHome = true;
        Stuck         = true;
    }