Esempio n. 1
0
    private void Awake()
    {
        earth   = GameObject.Find("earth");
        ke      = earth.GetComponent <killEarth>();
        music   = GameObject.Find("Music");
        expl    = GameObject.Find("Explosion");
        explos  = expl.GetComponent <AudioSource>();
        slup    = GameObject.Find("Slurp");
        slurpin = slup.GetComponent <AudioSource>();

        Component[] sounds = music.GetComponents(typeof(AudioSource));
        calm    = (AudioSource)sounds[0];
        siren   = (AudioSource)sounds[1];
        toms    = (AudioSource)sounds[2];
        highHat = (AudioSource)sounds[3];
        crash   = (AudioSource)sounds[4];
        anxiety = (AudioSource)sounds[5];

        calm.volume    = 1;
        siren.volume   = 0;
        toms.volume    = 0;
        highHat.volume = 0;
        crash.volume   = 0;
        anxiety.volume = 0;
    }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     earf = GameObject.Find("earth");
     kE   = earf.GetComponent <killEarth>();
     t    = cv.transform.GetChild(0).GetComponent <Timer>();
 }