/// <summary>
 /// Adds the an unconnected waypoint to the map .
 /// </summary>
 /// <param name="worldPos">The world pos.</param>
 /// <param name="type">The type.</param>
 public void AddDefaultWaypointUnconnected(Vector3 worldPos,WAYPOINTTYPE type)
 {
     Waypoint w = new Waypoint();
     w.Id = getId();
     w.WorldPos = worldPos;
     w.WayType = type;
     w.NeightBorWaypointsId = null;
     col.IdWaypoint.Add(w.Id, w);
     col.State = WaypointsState.UnConnected;
 }
Example #2
0
        /// <summary>
        /// Adds the an unconnected waypoint to the map .
        /// </summary>
        /// <param name="worldPos">The world pos.</param>
        /// <param name="type">The type.</param>
        public void AddDefaultWaypointUnconnected(Vector3 worldPos, WAYPOINTTYPE type)
        {
            Waypoint w = new Waypoint();

            w.Id                   = getId();
            w.WorldPos             = worldPos;
            w.WayType              = type;
            w.NeightBorWaypointsId = null;
            col.IdWaypoint.Add(w.Id, w);
            col.State = WaypointsState.UnConnected;
        }
Example #3
0
        /// <summary>
        /// Costs to cross implementation. (used if no delegate costtowalk is provided)
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns></returns>
        protected float CostToCrossImplementation(WAYPOINTTYPE type)
        {
            switch (type)
            {
            case WAYPOINTTYPE.NORMAL:
                return(10);

            case WAYPOINTTYPE.NOTWALKABLE:
                return(100000);

            case WAYPOINTTYPE.HARDTOWALK:
                return(50);

            default:
                return(10);
            }
        }
Example #4
0
 /// <summary>
 /// Costs to cross implementation. (used if no delegate costtowalk is provided)
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 protected float CostToCrossImplementation(WAYPOINTTYPE type)
 {
     switch (type)
     {
         case WAYPOINTTYPE.NORMAL:
             return 10;
         case WAYPOINTTYPE.NOTWALKABLE:
             return 100000;
         case WAYPOINTTYPE.HARDTOWALK:
             return 50;
         default:
             return 10;
     }
 }