// Update is called once per frame void Update() { if (loadRank.IsSortComplete()) { if (firstTime) { if (renderType == SCORE) { numRender = GetComponent <NumberRender>(); numRender.maxDigit = 5; var list = loadRank.GetScoreList(); for (int i = 0; i < list.Count; i++) { //逆になってるので反転する if ((i + 1).ToString() == gameObject.name) { score = list[i]; } } } else { textRender = GetComponent <TextRender>(); var list = loadRank.GetNameList(); for (int i = 0; i < list.Count; i++) { //逆になってるので反転する if ((i + 1).ToString() == gameObject.name) { name = list[i]; } } } firstTime = false; if (renderType == SCORE) { numRender.Draw(score, 1); } else { textRender.Draw(name, 1); } } } }
// Use this for initialization void Start() { numberRender = GetComponent <NumberRender>(); numberRender.maxDigit = 5; }