public static NodeNetworkSave FromNodeNetwork(FlatRedBall.AI.Pathfinding.NodeNetwork nodeNetwork) { NodeNetworkSave nodeNetworkSave = new NodeNetworkSave(); foreach (FlatRedBall.AI.Pathfinding.PositionedNode positionedNode in nodeNetwork.Nodes) { nodeNetworkSave.PositionedNodes.Add( PositionedNodeSave.FromPositionedNode(positionedNode)); } return(nodeNetworkSave); }
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; }
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); }