Beispiel #1
0
        /// <summary>
        /// 进入下一个技能Stage
        /// </summary>
        public void NextStage()
        {
            if (mAllStages.Count > 0)
            {
                // end current
                SkillActionBaseStage stage = mAllStages[0];
                SkillParent.RemoveUpdateFunc(stage.Update);
                stage.End();
                mAllStages.RemoveAt(0);

                // start next
                if (mAllStages.Count > 0)
                {
                    SkillActionBaseStage next_stage = mAllStages[0];

                    if (next_stage.Begin(this))
                    {
                        mCurrentStage = next_stage;
                        SkillParent.SetUpdateFuncRun(next_stage.Update);
                    }
                    else
                    {
                        NextStage();
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 中断技能的Stage
        /// </summary>
        public void FinishStage()
        {
            mCurrentStage = null;
            if (mAllStages.Count > 0)
            {
                // end current
                SkillActionBaseStage stage = mAllStages[0];
                SkillParent.RemoveUpdateFunc(stage.Update);
                stage.End();
                mAllStages.RemoveAt(0);
            }

            // clear all
            foreach (SkillActionBaseStage stage in mAllStages)
            {
                stage.End();
            }
            mAllStages.Clear();
        }