Exemplo n.º 1
0
    public void ShowHit(uint hitCountVal)
    {
        List <uint> numArr = new List <uint>();

        Mathfx.GetNumArr(hitCountVal, numArr);
        if (numArr.Count > hitCount.Count)
        {
            Debug.Log("not enough hit num image, expected " + numArr.Count + " but " + hitCount.Count);
            return;
        }
        for (int i = 0; i < numArr.Count; ++i)
        {
            int j = hitCount.Count - 1 - i;
            if (hitCount[j].gameObject.activeSelf == false)
            {
                hitCount[j].gameObject.SetActive(true);
            }
            hitCount[j].sprite = uiSet.hitNumSprites[(int)numArr[i]];
            UITween.Instance.Bounce(hitCount[j].gameObject, 1.5f, 0.25f, 0.5f, 1);
        }
        if (hitWords.gameObject.activeSelf == false)
        {
            hitWords.gameObject.SetActive(true);
        }
        UITween.Instance.Bounce(hitWords.gameObject, 1.5f, 0.25f, 0.5f, 1);
    }