Beispiel #1
0
    void Start()
    {
        //maxhealth is a scale value and currenthealth and speed are based from maxhealth.
        //this makes it possible to scale the bar without editing the script.
        maxHealth = transform.localScale.x;
        currentHealth =  maxHealth / 2;
        health = currentHealth;

        //declares the generator for supermode.
        generateOneObject = superGenerator.GetComponent<GenerateOneObject>();

        startVolume = audioSource.volume;

		audioSource.clip = normalMusic;
	    audioSource.Play ();
    }
Beispiel #2
0
    void Start()
    {
        //maxhealth is a scale value and currenthealth and speed are based from maxhealth.
        //this makes it possible to scale the bar without editing the script.
        maxHealth     = transform.localScale.x;
        currentHealth = maxHealth / 2;
        health        = currentHealth;

        //declares the generator for supermode.
        generateOneObject = superGenerator.GetComponent <GenerateOneObject>();

        startVolume = audioSource.volume;

        audioSource.clip = normalMusic;
        audioSource.Play();
    }