Ejemplo n.º 1
0
        public static WrappedCoroutine <T> Wrap <T>(IEnumerable <T> f, bool throwErrors = false)
        {
            var co = new Coroutine <T>(f)
            {
                ThrowErrors = throwErrors
            };
            var wrapped = new WrappedCoroutine <T>((args) => {
                if (co.status == CoStatus.Dead)
                {
                    co.Reset();
                }
                return(co.Resume(args));
            });

            return(wrapped);
        }
Ejemplo n.º 2
0
 void InitializeSkill()
 {
     meleeAttackWC = new WrappedCoroutine(this, MeleeAttack);
 }