public void addTransition(tTransition type, float transitionTime, Color transitionColor)
 {
     this.type = type;
     this.time = transitionTime;
     this.initialTime = this.time;
     this.color = transitionColor;
 }
 public void changeStateWithFade( StateManager.tGameState state, int clearStates, string level, float fadeTime, Color fadeColor)
 {
     this.state = state;
     this.clearStates = clearStates;
     this.type = tTransition.FadeIn;
     this.time = fadeTime;
     this.initialTime = this.time;
     this.level = level;
     this.color = fadeColor;
 }
        public void update()
        {
            time -= SB.dt;

            if (level != null || state != StateManager.tGameState.None)
            {
                updateSpecialFade();
            }

            switch (type)
            {
                case tTransition.FadeIn:
                    value = Math.Min(1.0f, (initialTime - time) / initialTime);
                    break;
                case tTransition.FadeOut:
                    value = Math.Max(0.0f, time / initialTime);
                    break;
                default:
                    break;
            }

            if (time < 0.0f)
            {
                type = tTransition.None;
            }
        }
 public void loadLevelWithFade(string level, WorldMapLocation.tLocationType locationType, float fadeTime, Color fadeColor)
 {
     this.type = tTransition.FadeIn;
     this.time = fadeTime;
     this.initialTime = this.time;
     this.level = level;
     this.locationType = locationType;
     this.color = fadeColor;
 }