示例#1
0
    void ResetAll()
    {
        for (int i = 0; i < SimpleMap.map.spots.GetLength(0); i++)
        {
            for (int j = 0; j < SimpleMap.map.spots.GetLength(1); j++)
            {
                Destroy(SimpleMap.map.spots [i, j].gameObject);
            }
        }

        SimpleMap.map.Start();

        OPENSet.Clear();
        CLOSEDSet.Clear();
        path.Clear();

        PlayerController.player.pathCtrl.DestroyPath();

        SetStartAndGoal();                      //if there is other method of choosing these spots
    }
示例#2
0
 void Delete(Spot X)
 {
     OPENSet.Remove(X);
     X.t = Spot.State.CLOSED;
     CLOSEDSet.Add(X);
 }