// Path: core/src/com/gdx/musicevents/effects/Effect.java
// public interface Effect {
//     public void update(float dt);
//     public boolean isDone();
// }
// 
// Path: core/src/com/gdx/musicevents/effects/Play.java
// public class Play implements StartEffect {
// 
//     
//     private MusicState nextState;
//     
//     public Play() {
//     }
// 
//     @Override
//     public void beginStart() {
//         nextState.play();
//         nextState.setVolume(1);
//     }
// 
//     @Override
//     public void endStart() {
//     }
// 
//     @Override
//     public void update(float dt) {
//     }
// 
//     @Override
//     public boolean isDone() {
//         return true;
//     }
// 
//     @Override
//     public void initialize(MusicState nextState, MusicState previousState) {
//         this.nextState = nextState;
//     }
// }
// 
// Path: core/src/com/gdx/musicevents/effects/StartEffect.java
// public interface StartEffect extends Effect {
//     public void initialize(MusicState nextState, MusicState previousState);
//     public void beginStart();
//     public void endStart();
// }
// 
// Path: core/src/com/gdx/musicevents/effects/Stop.java
// public class Stop implements StopEffect {
//     private MusicState nextState;
// 
//     public Stop() {
//     }
// 
//     @Override
//     public void initialize(MusicState nextState, MusicState previousState) {
//         this.nextState = nextState;
//     }
//     
//     @Override
//     public void beginStop() {
//         nextState.stop();
//     }
// 
//     @Override
//     public void endStop() {
// 
//     }
// 
//     @Override
//     public void update(float dt) {
//     }
// 
//     @Override
//     public boolean isDone() {
//         return true;
//     }
// }
// 
// Path: core/src/com/gdx/musicevents/effects/StopEffect.java
// public interface StopEffect extends Effect {
// 
//     public void initialize(MusicState nextState, MusicState previousState);
//     public void beginStop();
// 
//     public void endStop();
// }


import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Music.OnCompletionListener;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;
import com.gdx.musicevents.effects.Effect;
import com.gdx.musicevents.effects.Play;
import com.gdx.musicevents.effects.StartEffect;
import com.gdx.musicevents.effects.Stop;
import com.gdx.musicevents.effects.StopEffect;
        this.enterTransitions.put(eventName, effect);
    }

    public void removeEnterTransition(String name) {
        this.enterTransitions.remove(name);

    }
    public void addExitTransition(String eventName, StopEffect effect) {
        this.exitTransitions.put(eventName, effect);
    }

    public void removeExitTransition(String name) {
        this.exitTransitions.remove(name);

    }
    
    public Track getCurrentTrack() {
        if(currentTrackIndex < 0 || currentTrackIndex >= tracks.size){
            return null;
        }
        
        return getTracks().get(currentTrackIndex);
    }
    
    @Override
    public String toString() {
        return this.name;
    }

    public Array<Track> getTracks() {
// Path: core/src/com/gdx/musicevents/effects/Effect.java
// public interface Effect {
//     public void update(float dt);
//     public boolean isDone();
// }
// 
// Path: core/src/com/gdx/musicevents/effects/Play.java
// public class Play implements StartEffect {
// 
//     
//     private MusicState nextState;
//     
//     public Play() {
//     }
// 
//     @Override
//     public void beginStart() {
//         nextState.play();
//         nextState.setVolume(1);
//     }
// 
//     @Override
//     public void endStart() {
//     }
// 
//     @Override
//     public void update(float dt) {
//     }
// 
//     @Override
//     public boolean isDone() {
//         return true;
//     }
// 
//     @Override
//     public void initialize(MusicState nextState, MusicState previousState) {
//         this.nextState = nextState;
//     }
// }
// 
// Path: core/src/com/gdx/musicevents/effects/StartEffect.java
// public interface StartEffect extends Effect {
//     public void initialize(MusicState nextState, MusicState previousState);
//     public void beginStart();
//     public void endStart();
// }
// 
// Path: core/src/com/gdx/musicevents/effects/Stop.java
// public class Stop implements StopEffect {
//     private MusicState nextState;
// 
//     public Stop() {
//     }
// 
//     @Override
//     public void initialize(MusicState nextState, MusicState previousState) {
//         this.nextState = nextState;
//     }
//     
//     @Override
//     public void beginStop() {
//         nextState.stop();
//     }
// 
//     @Override
//     public void endStop() {
// 
//     }
// 
//     @Override
//     public void update(float dt) {
//     }
// 
//     @Override
//     public boolean isDone() {
//         return true;
//     }
// }
// 
// Path: core/src/com/gdx/musicevents/effects/StopEffect.java
// public interface StopEffect extends Effect {
// 
//     public void initialize(MusicState nextState, MusicState previousState);
//     public void beginStop();
// 
//     public void endStop();
// }


// Path: core/src/com/gdx/musicevents/MusicState.java
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Music.OnCompletionListener;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;
import com.gdx.musicevents.effects.Effect;
import com.gdx.musicevents.effects.Play;
import com.gdx.musicevents.effects.StartEffect;
import com.gdx.musicevents.effects.Stop;
import com.gdx.musicevents.effects.StopEffect;

        this.enterTransitions.put(eventName, effect);
    }

    public void removeEnterTransition(String name) {
        this.enterTransitions.remove(name);

    }
    public void addExitTransition(String eventName, StopEffect effect) {
        this.exitTransitions.put(eventName, effect);
    }

    public void removeExitTransition(String name) {
        this.exitTransitions.remove(name);

    }
    
    public Track getCurrentTrack() {
        if(currentTrackIndex < 0 || currentTrackIndex >= tracks.size){
            return null;
        }
        
        return getTracks().get(currentTrackIndex);
    }
    
    @Override
    public String toString() {
        return this.name;
    }

    public Array<Track> getTracks() {
        return tracks;