Пример #1
0
    public void ExecuteStepUpdate()
    {
        ICardAbilityStep runningStep = currentlyRunningStep;

        if (runningStep != null)
        {
            runningStep.Execute();
        }
    }
Пример #2
0
    public void ChangeStep(ICardAbilityStep newStep)
    {
        if (currentlyRunningStep != null)
        {
            currentlyRunningStep.Exit();
        }

        previouslyRunningStep = currentlyRunningStep;

        currentlyRunningStep = newStep;
        currentlyRunningStep.Enter();
    }
Пример #3
0
 public void SwitchToPreviousStep()
 {
     currentlyRunningStep.Exit();
     currentlyRunningStep = previouslyRunningStep;
     currentlyRunningStep.Enter();
 }