// Use this for initialization void Start() { kolajnice = GameObject.FindGameObjectWithTag("KolajniceTag").GetComponent<Kolajnice>(); character = GameObject.FindGameObjectWithTag("Player"); if (GameObject.FindGameObjectWithTag("LoadLevelParameterTag") != null) load = GameObject.FindGameObjectWithTag("LoadLevelParameterTag").GetComponent<LoadingLevelParameter>(); audio = GetComponent<AudioSource>(); pickedSong = kolajnice.MasterPickedSong; switch (pickedSong) { case 1: audio.clip = song1; break; case 2: audio.clip = song2; break; case 3: audio.clip = song3; break; case 0: //Debug.Log(load.getCustomSongPath()); StartCoroutine(loadMp3(load.getCustomSongPath())); break; } }
void Start() { load = GameObject.FindGameObjectWithTag("LoadLevelParameterTag").GetComponent<LoadingLevelParameter>(); }
// Use this for initialization void Start() { movementScript = GameObject.FindGameObjectWithTag ("Player").GetComponent<Movement> (); PauseText.enabled = false; if (GameObject.FindGameObjectWithTag ("LoadLevelParameterTag") != null) { parameterScript = GameObject.FindGameObjectWithTag("LoadLevelParameterTag").GetComponent<LoadingLevelParameter>(); MasterPickedSong = parameterScript.getLoadLevelParameter(); ///////////////////////////////////////////////////// if (parameterScript.getDifficulty() == false) setIsEasyMode(true); else setIsEasyMode(false); ///////////////////////////////////////////////////// pickedScene = parameterScript.sbsetter; } else { Debug.LogWarning ("LoadLevelParameter object not found..."); setIsEasyMode(true); } //open file ////////////////////////////////////////// string filename = ""; switch (MasterPickedSong) { case 1: Debug.Log("1"); filename = path1; break; case 2: Debug.Log("2"); filename = path2; break; case 3: Debug.Log("3"); filename = path3; break; case 0: Debug.Log(parameterScript.getCustomPath()); Debug.Log("0"); filename = parameterScript.getCustomPath(); break; } ImportFromFile(filename); SpawnMap(); Debug.Log ("EASY MODE IS >>> " + getIsEasyMode()); //nefunguje z nejakeho dovodu.... musicPlayer = GameObject.FindGameObjectWithTag ("MusicPlayer").GetComponent<MusicPlayer> (); musicPlayer.pickedSong = MasterPickedSong; this.transform.position = new Vector3(stretchingFactor * countInTime, 0, -sideDistance); elapsedTime = 0; //#if UNITY_EDITOR // startTime = -0.01f; //#else startTime = Time.time; //#endif }