public node(windInfo a_info) { next = null; prev = null; info = a_info; }
//constructor for the node public node() { next = null; prev = null; //create an object of the windInfo class info = new windInfo(0, 0); }
private void add_windData(node head, windInfo a_info) { //in this case, there is no wind data in the list.. YET if (head == null) { head = new node(a_info); } else { node temp = new node(a_info); temp.connect_next(head); head = temp; } }
// Start is called before the first frame update void Start() { linkedList list = new linkedList(); windInfo the_info = new windInfo(4.0, 6.0); windInfo the_info2 = new windInfo(2.0, 3.0); list.add_windData(the_info); list.add_windData(the_info2); list.display_info(); Text tempForecastURL = Instantiate(T1); // tempT1.transform.SetParent(canvas, false); // Text tempT2 = Instantiate(T2); // tempT2.transform.SetParent(canvas, false); // tempT1.transform.position += new Vector3(0.0f, -40.0f, 0.0f); // tempT2.transform.position += new Vector3(0.0f, -40.0f, 0.0f); StartCoroutine(GetRequest("https://api.weather.gov/points/45.7534,-121.9908", ForecastURL)); //StartCoroutine(GetRequest("https://api.weather.gov/points/44.8869,-124.0258", tempT1, tempT2)); //StartCoroutine(GetRequest("https://api.weather.gov/points/44.9287,-124.0386")); }
//add wind info data to the linked list public void add_windData(windInfo a_info) { add_windData(head, a_info); }