コード例 #1
0
    // Use this for initialization
    void Start()
    {
        for (int i = 0; i < m_userScores.Length; i++)
        {
            scores[i].id    = (UserID)(i);
            scores[i].score = GuestScores.GetScore(scores[i].id);
        }


        Array.Sort(scores, (a, b) => b.score - a.score);

        for (int i = 0; i < m_userScores.Length; i++)
        {
            switch (scores[i].id)
            {
            case UserID.User1:
                m_userScores[i].color = m_userColor[0];
                m_userScores[i].text += " 1P " + scores[i].score.ToString();
                break;

            case UserID.User2:
                m_userScores[i].color = m_userColor[1];
                m_userScores[i].text += " 2P " + scores[i].score.ToString();
                break;

            case UserID.User3:
                m_userScores[i].color = m_userColor[2];
                m_userScores[i].text += " 3P " + scores[i].score.ToString();
                break;

            case UserID.User4:
                m_userScores[i].color = m_userColor[3];
                m_userScores[i].text += " 4P " + scores[i].score.ToString();
                break;

            default:
                break;
            }
            if (i == 0)
            {
                m_1stImages[(int)scores[i].id].enabled = true;
            }
            else
            {
                m_1stImages[(int)scores[i].id].enabled = false;
            }

            m_rankImages[(int)scores[i].id].sprite = m_rankSprites[i];
        }
    }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        // カウントアップ演出はアルファ終わってから?
        m_userScore = GuestScores.GetScore(m_userID);
        int temp = m_userScore;


        for (int i = 0; i < m_numberImage.Length; i++)
        {
            // 1の位
            m_numberImage[i].sprite = m_numberSpriteArray[temp % 10];

            // 10の位
            temp /= 10;
        }
    }