Beispiel #1
0
    IEnumerator RandomName(bool isMale)
    {
        yield return(null);

        UGUISpriteAnimation ani = transform.Find("nickname/Image_dice").GetComponent <UGUISpriteAnimation>();

        ani.PlayFromOldFrame();

        float diceTimer = DICE_TIME;
        float nameTimer = 0f;

        _isRandomingName = true;
        KeyEventManager.instance.EnableKeyboardEvent(false);
        while (diceTimer > 0)
        {
            diceTimer -= Time.deltaTime;
            nameTimer += Time.deltaTime;

            if (nameTimer >= 1f / CHANGE_NAME_FPS)
            {
                nameTimer = 0;
                SetRandomName(_xingArr, isMale);
            }

            yield return(null);
        }
        ani.Stop();
        _isRandomingName = false;
        KeyEventManager.instance.EnableKeyboardEvent(true);
    }
 static public int Stop(IntPtr l)
 {
     try {
         UGUISpriteAnimation self = (UGUISpriteAnimation)checkSelf(l);
         self.Stop();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }