22 lines
764 B
C#
22 lines
764 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DataController : MonoSingleton<DataController>
|
|
{
|
|
public AreaStationData areaStationData = new AreaStationData();
|
|
public string distCode = "37";
|
|
// Start is called before the first frame update
|
|
private async void Start()
|
|
{
|
|
string url = Bootstrap.Instance.urlDic["µØÍ¼ÐÅÏ¢»ã×Ü"];
|
|
areaStationData = await AsyncWebReq.Get<AreaStationData>(url + distCode, Bootstrap.Instance.webAdapter.head, Bootstrap.Instance.webAdapter.token);
|
|
}
|
|
|
|
public ScreenTopStatistics GetStationsByDistCode(string distCode)
|
|
{
|
|
DataItem sts = areaStationData.data.Find(s => s.distCode == distCode);
|
|
return sts.screenTopStatistics;
|
|
}
|
|
}
|