void Awake() { getScoreboard = getScoreboardObj.GetComponent <GetScoreboard>(); chooseBtn = chooseBtnObj.GetComponent <Button>(); insertBtn = insertBtnObj.GetComponent <Button>(); dragBtn = dragBtnObj.GetComponent <Button>(); allBtn = allBtnObj.GetComponent <Button>(); synBtn = synBtnObj.GetComponent <Button>(); chooseTxt = chooseBtnObj.GetComponentInChildren <Text>(); insertTxt = insertBtnObj.GetComponentInChildren <Text>(); dragTxt = dragBtnObj.GetComponentInChildren <Text>(); allTxt = allBtnObj.GetComponentInChildren <Text>(); synTxt = synBtnObj.GetComponentInChildren <Text>(); contentAreaObjects = new List <GameObject>(); leaderboardPlayerPrefabsScr = new List <LeaderboardPlayerPrefab>(); scrollRectScorboard = objScrollViewTxtScoreboard.GetComponent <ScrollRect>(); contentTrans = contentObj.GetComponent <RectTransform>(); thisPlayerObj.SetActive(false); leaderboard = (LoadLeaderboard)GameObject.FindObjectOfType(typeof(LoadLeaderboard)); }
// Use this for initialization void Awake() { scrTimer = objTimer.GetComponent <TimerUI>(); scrollRectScorboard = objScrollViewTxtScoreboard.GetComponent <ScrollRect>(); contentTrans = contentObj.GetComponent <RectTransform>(); thisPlayerObj.SetActive(false); leaderboard = (LoadLeaderboard)GameObject.FindObjectOfType(typeof(LoadLeaderboard)); }
public IEnumerator IEGetLeaderboardData(LoadLeaderboard sender) { WWWForm form = new WWWForm(); form.AddField("action", "getScore"); WWW www = new WWW(m_Link, form); yield return(www); LeaderboardResponse response = JsonUtility.FromJson <LeaderboardResponse>(www.text); sender.SetData(response); }
public void GetLeaderboardData(LoadLeaderboard sender) { StartCoroutine(IEGetLeaderboardData(sender)); }