Пример #1
0
        protected override void TransitionTo(LeaguePhaseBase nextPhase, object tag = null)
        {
            nextPhase.ThrowIfNull("nextPhase");

            logger.Info("Transitioning from " + (currentPhase == null ? "null" : currentPhase.GetType().Name) + " to " + (nextPhase == null ? "null" : nextPhase.GetType().Name));

            var previousPhase = currentPhase;

            if (previousPhase != null)
            {
                previousPhase.EndPhase();
            }
            currentPhase = nextPhase;
            if (nextPhase != null)
            {
                nextPhase.BeginPhase(new BeginPhaseArgs(previousPhase, tag));
            }

            OnPhaseChanged(new LeagueSessionPhaseChangedArgs(previousPhase == null ? LeagueSessionPhase.Uninitialized : previousPhase.Phase, currentPhase.Phase));
        }
        protected override void TransitionTo(LeaguePhaseBase nextPhase, object tag = null)
        {
            nextPhase.ThrowIfNull("nextPhase");

             logger.Info("Transitioning from " + (currentPhase == null ? "null" : currentPhase.GetType().Name) + " to " + (nextPhase == null ? "null" : nextPhase.GetType().Name));

             var previousPhase = currentPhase;
             if (previousPhase != null)
            previousPhase.EndPhase();
             currentPhase = nextPhase;
             if (nextPhase != null)
            nextPhase.BeginPhase(new BeginPhaseArgs(previousPhase, tag));

             OnPhaseChanged(new LeagueSessionPhaseChangedArgs(previousPhase == null ? LeagueSessionPhase.Uninitialized : previousPhase.Phase, currentPhase.Phase));
        }
Пример #3
0
 public BeginPhaseArgs(LeaguePhaseBase previousPhase, object tag)
 {
     this.previousPhase = previousPhase;
     this.tag           = tag;
 }
Пример #4
0
 protected virtual void TransitionTo(LeaguePhaseBase nextPhase, object tag = null)
 {
     context.TransitionTo(nextPhase, tag);
 }
 public BeginPhaseArgs(LeaguePhaseBase previousPhase, object tag)
 {
     this.previousPhase = previousPhase;
     this.tag = tag;
 }
 protected virtual void TransitionTo(LeaguePhaseBase nextPhase, object tag = null)
 {
     context.TransitionTo(nextPhase, tag);
 }