Exemplo n.º 1
0
        //지연된 호출
        public DelayCall delayedCall(float duration, Action callback)
        {
            if (gameObject.activeSelf)
            {
                DelayCall delayCall = new DelayCall(duration, callback, false, 0);
                StartCoroutine(delayCall.Start());
                return(delayCall);
            }

            return(null);
        }
Exemplo n.º 2
0
        //nRepeatCount 가 0이면 무한대 반복
        public DelayCall delayedCall(float duration, Action callback, int nRepeatCount)
        {
            if (gameObject.activeSelf)
            {
                DelayCall delayCall = new DelayCall(duration, callback, true, nRepeatCount);

                StartCoroutine(delayCall.Start());
                return(delayCall);
            }
            else
            {
                return(null);
            }
        }