예제 #1
0
    void DisplayNumUpdate(int target)
    {
        int sign = (int)Mathf.Sign(target - displayNum);

        int i = sign >= 0 ? 0 : 3;

        while (i >= 0 && i <= 3)
        {
            if (i < target)
            {
                mgr.InfoTrans(i);
            }
            else if (sign < 0)
            {
                mgr.InfoTrans(i, false);
            }

            i += sign;
        }

        mgr.SetDisplayNum(target);
        displayNum = target;
    }