Example #1
0
 public NewbieStepBase FindCertainStep(ENewbieStepType inStepType)
 {
     for (int i = 0; i < this._allSteps.Count; i++)
     {
         NewbieStepBase newbieStepBase = this._allSteps[i];
         if (newbieStepBase.IsStep(inStepType))
         {
             return(newbieStepBase);
         }
     }
     return(null);
 }
Example #2
0
        public void MoveNextStep()
        {
            if (this._curStep == null)
            {
                return;
            }
            NewbieStepBase nextStep = this._curStep.GetNextStep();

            if (nextStep == null)
            {
                return;
            }
            this._curStep.OnLeave();
            nextStep.HandleAction();
            this._curStep = nextStep;
            this._curStep.DescribeSelf();
        }
Example #3
0
        public bool MoveCertainStep(ENewbieStepType inStepType, bool inIsCheckCurStep, ENewbieStepType inCheckStepType)
        {
            if (inIsCheckCurStep && this._curStep.GetStepType() != inCheckStepType)
            {
                return(false);
            }
            NewbieStepBase newbieStepBase = this.FindCertainStep(inStepType);

            if (newbieStepBase == null)
            {
                return(false);
            }
            if (this._curStep.GetStepType() == newbieStepBase.GetStepType())
            {
                return(false);
            }
            this._curStep.OnLeave();
            newbieStepBase.HandleAction();
            this._curStep = newbieStepBase;
            this._curStep.DescribeSelf();
            return(true);
        }
Example #4
0
 public void BindNextStep(NewbieStepBase inStep)
 {
     this._nextStep = inStep;
 }