示例#1
0
        public void Copy(WaypointLinkObject _link)
        {
            if (_link == null)
            {
                return;
            }

            base.Copy(_link);

            Waypoint = _link.Waypoint;
        }
示例#2
0
        public bool RemoveWaypointByObject(GameObject _object)
        {
            if (_object == null || _object == Owner)
            {
                return(false);
            }

            WaypointLinkObject _waypoint = GetWaypoint(_object);

            if (_waypoint != null)
            {
                return(Links.Remove(_waypoint));
            }

            return(false);
        }
示例#3
0
        public ICECreatureWaypoint SubdivideLink(WaypointLinkObject _link)
        {
            if (_link == null)
            {
                return(null);
            }

            ICECreatureWaypoint _sub_waypoint = CreateWaypointByPosition(Vector3.Lerp(Owner.transform.position, _link.Waypoint.ObjectTransform.position, 0.5f));

            _sub_waypoint.Links.AddWaypointByObject(Owner);

            ICECreatureWaypoint _link_waypoint = _link.OwnerComponent as ICECreatureWaypoint;

            _sub_waypoint.Links.AddWaypointByObject(_link.Waypoint.gameObject);
            _link_waypoint.Links.AddWaypointByObject(_sub_waypoint.gameObject);

            _sub_waypoint.UseDebug = true;

            _link.Waypoint.Links.RemoveWaypointByObject(Owner);
            RemoveWaypointByObject(_link.Waypoint.gameObject);

            return(_sub_waypoint);
        }
示例#4
0
 public WaypointLinkObject(WaypointLinkObject _object) : base(_object)
 {
     Copy(_object);
 }