- Home /
Unreal Tournament like points/nodes
Hello i wonder what is the best structure to achieve unreal tournament 2004 like points/nodes.
Each point is linked to other points chosen specifically. Point 2 has as many as 4 other points connected to it.
Right now i have a Node class and inside a list of Nodes as neighbors. Is this the best way :s
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Node : MonoBehaviour
{
public List<Node>Neighbors;
}
Comment
Best Answer
Answer by hexagonius · Feb 23, 2015 at 07:01 AM
Sounds solid. The only other way I could think of is a dictionary of node and list, but that approach is just putting everything into one data Structure, essentially its the same. And if yours works on such an easy to achieve level, why bother :)