Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
 public BeginPhaseArgs(LeaguePhaseBase previousPhase, object tag)
 {
     this.previousPhase = previousPhase;
     this.tag           = tag;
 }
Ejemplo n.º 4
0
 protected virtual void TransitionTo(LeaguePhaseBase nextPhase, object tag = null)
 {
     context.TransitionTo(nextPhase, tag);
 }
Ejemplo n.º 5
0
 public BeginPhaseArgs(LeaguePhaseBase previousPhase, object tag)
 {
     this.previousPhase = previousPhase;
     this.tag = tag;
 }
Ejemplo n.º 6
0
 protected virtual void TransitionTo(LeaguePhaseBase nextPhase, object tag = null)
 {
     context.TransitionTo(nextPhase, tag);
 }