using UnityEngine;
using System.Collections;

public class MusicSwap : MonoBehaviour {
	public AudioSource mainsong;
	public AudioSource remix;
	// Use this for initialization
	void Start () {
		mainsong.Play ();
	}
	
	// Update is called once per frame
	void Update () {
	
	}


	void OnTriggerEnter(Collider other){
		
		if (other.gameObject.name == "tempChar") {
			if (mainsong.isPlaying) {
				remix.Play ();
				mainsong.Stop ();
			} else {
				mainsong.Play ();
				remix.Stop ();
			}
		}
	}
}
