コード例 #1
0
        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);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        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);
        }