You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.0 KiB
36 lines
1.0 KiB
using UnityEngine; |
|
using System.Collections; |
|
using AX.NetworkSystem; |
|
using UnityEngine.UI; |
|
|
|
public class AllScoreMessage : MonoBehaviour { |
|
|
|
public ScoreInfo score; |
|
void Start() |
|
{ |
|
transform.Find("Toggle").GetComponent<Toggle>().onValueChanged.AddListener(changeSelected); |
|
} |
|
void OnDestroy() |
|
{ |
|
transform.Find("Toggle").GetComponent<Toggle>().onValueChanged.RemoveListener(changeSelected); |
|
} |
|
// Update is called once per frame |
|
void Update() |
|
{ |
|
|
|
} |
|
public void setScore(ScoreInfo score) |
|
{ |
|
this.score = score; |
|
transform.Find("Creator").GetComponent<Text>().text = score.CreatorName; |
|
transform.Find("CreateTime").GetComponent<Text>().text = score.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"); |
|
transform.Find("Score").GetComponent<Text>().text = score.Score; |
|
} |
|
private void changeSelected(bool selected) |
|
{ |
|
if (selected) |
|
{ |
|
NetworkManager.Default.SendRequestAsync("GET_SCORE_DETAIL_INFOS_REQUEST", score.ID); |
|
} |
|
} |
|
}
|
|
|