Esempio n. 1
0
        //-----------------------------------------------------------------------------------------------
        public Waypoint(FPoint fp, Waypoint parent, bool done)
        {
            this.type = WaypointType.Normal;
            this.done = done;

            this.parent = parent;
            this.fp     = fp.Clone();

            if (parent == null)
            {
                G = 0;
            }
            else
            {
                G = parent.G + fp.Distance(parent.fp);
            }

            H = fp.Distance(fp_dst);

            F = G + H;
        }
Esempio n. 2
0
 static FPoint fp_dst;         //颇郁闷...
 static public void SetDest(FPoint dst)
 {
     fp_dst = dst.Clone();
 }