예제 #1
0
    public static Coroutine StartCoroutineEx(this MonoBehaviour self, IEnumerator routine, out UnityCoroutine unityCoroutine)
    {
        if (routine == null)
        {
            throw new ArgumentNullException("routine");
        }

        unityCoroutine = new UnityCoroutine(routine);
        return(self.StartCoroutine(unityCoroutine.Start()));
    }
예제 #2
0
        public IDisposable Play(ICursor cursor)
        {
            if (cursor == null)
            {
                throw new NotImplementedException();
            }

            IEnumerator coroutine = new Coroutine(this, cursor);
            var         canceler  = UnityCoroutine.Start(coroutine);

            return(canceler);
        }