Example #1
0
        public static LinkSave FromLink(FlatRedBall.AI.Pathfinding.Link link)
        {
            LinkSave linkSave = new LinkSave();

            linkSave.Cost          = link.Cost;
            linkSave.NodeLinkingTo = link.NodeLinkingTo.Name;

            return(linkSave);
        }
Example #2
0
        public static LinkSave FromLink(FlatRedBall.AI.Pathfinding.Link link)
        {
            LinkSave linkSave = new LinkSave();

            linkSave.Cost = link.Cost;
            linkSave.NodeLinkingTo = link.NodeLinkingTo.Name;

            return linkSave;

        }
        public static PositionedNodeSave FromPositionedNode(FlatRedBall.AI.Pathfinding.PositionedNode positionedNode)
        {
            PositionedNodeSave nodeSave = new PositionedNodeSave();

            nodeSave.Name = positionedNode.Name;
            nodeSave.X    = positionedNode.Position.X;
            nodeSave.Y    = positionedNode.Position.Y;
            nodeSave.Z    = positionedNode.Position.Z;

            foreach (FlatRedBall.AI.Pathfinding.Link link in positionedNode.Links)
            {
                nodeSave.Links.Add(
                    LinkSave.FromLink(link));
            }

            return(nodeSave);
        }