Пример #1
0
 // Use this for initialization
 void Start()
 {
     kolajnice = GameObject.FindGameObjectWithTag("KolajniceTag").GetComponent<Kolajnice>();
 }
Пример #2
0
 // 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;
     }
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     animator = GetComponentInChildren<PlayerAnimation>();
     kolajnice = GameObject.FindGameObjectWithTag("KolajniceTag").GetComponent<Kolajnice>();
     jumpDistance = kolajnice.sideDistance;
     targetPosition = transform.localPosition;
     startPosition = targetPosition;
     mPlayer = GameObject.FindGameObjectWithTag("MusicPlayer").GetComponent<MusicPlayer>();
 }
Пример #4
0
 void Start()
 {
     kolajnice = GameObject.FindGameObjectWithTag("KolajniceTag").GetComponent<Kolajnice>();
     timeIn.color = startColor;
 }