public static NodeGraphicScript CreateGraphic(NodeScript node, Vector3 position, float radius) { // XXX: Collision checking for finding position Vector3 pos = position + UnityEngine.Random.onUnitSphere * radius; // XXX: Spawn far away (in param) and MoveTo position GameObject newNode; newNode = GameObject.Instantiate(nodePrefab, pos, Quaternion.identity, gameObject.transform) as GameObject; newNode.SetActive(true); NodeGraphicScript script = newNode.GetComponent <NodeGraphicScript>(); script.Init(node); nodes.Add(node.GetAddress(), script); return(script); }
public static bool NodeIsVisible(NodeScript node) { return(NodeIsVisible(node.GetAddress())); }
public static NodeGraphicScript GetGraphic(NodeScript node) { return(nodes[node.GetAddress()]); }
public static NodeGraphicScript DisplayNode(Vector3 position, NodeScript node) { return(DisplayNode(position, node.GetAddress())); }