Exemple #1
0
        // Run Action
        public override ActionState OnUpdate()
        {
            if (null == async || !async.isDone)
            {
                ActionState result = base.OnUpdate();
                if (result != ActionState.Success)
                {
                    return(result);
                }
            }

            // no more tasks
            if (loop < 1)
            {
                return(ActionState.Success);
            }

            state = this.UpdateSequence();
            if (ActionState.Running == state && null == async)
            {
                async = new AsyncProcessing(StartCoroutine(CoUpdateSequence()));
            }

            return(state);
        }
Exemple #2
0
        protected override void OnReset()
        {
            base.OnReset();

            if (null != async && null != async.backgroundWorking)
            {
                StopCoroutine(async.backgroundWorking);
                async = null;
            }

            m_index = 0;

            // reset children
            ResetChildren();
        }