Inheritance: MonoBehaviour
Example #1
0
    void Start()
    {
        lifetime    = intervalPintada;
        pintadatime = tempsPintada;
        alphaValue  = minAlpha;
        GameObject go = GameObject.FindGameObjectWithTag("Player");

        pj     = go.GetComponent("MainPjMovement") as MainPjMovement;
        player = go.GetComponent("Player") as Player;

        audioTexture = audioONNormal;
        AmbientAudio = GameObject.FindObjectOfType(typeof(AmbientalMusic)) as AmbientalMusic;

        string playerSelected = PlayerPrefs.GetString("player");

        if (playerSelected.Equals("player1"))
        {
            magiaNormal = magicTextures [0];
            magiaSelect = magicTexturesSpelled [0];
        }
        else if (playerSelected.Equals("player2"))
        {
            magiaNormal = magicTextures [1];
            magiaSelect = magicTexturesSpelled [1];
        }
        else
        {
            magiaNormal = magicTextures [2];
            magiaSelect = magicTexturesSpelled [2];
        }
    }
Example #2
0
		void Start ()
		{
				lifetime = intervalPintada;
				pintadatime = tempsPintada;
				alphaValue = minAlpha;
				GameObject go = GameObject.FindGameObjectWithTag ("Player");
				pj = go.GetComponent ("MainPjMovement") as MainPjMovement;
				player = go.GetComponent ("Player") as Player;
		
				audioTexture = audioONNormal;
				AmbientAudio = GameObject.FindObjectOfType (typeof(AmbientalMusic)) as AmbientalMusic;

				string playerSelected = PlayerPrefs.GetString ("player");
				if (playerSelected.Equals ("player1")) {
						magiaNormal = magicTextures [0];
						magiaSelect = magicTexturesSpelled [0];
				} else if (playerSelected.Equals ("player2")) {
						magiaNormal = magicTextures [1];
						magiaSelect = magicTexturesSpelled [1];
				} else {
						magiaNormal = magicTextures [2];
						magiaSelect = magicTexturesSpelled [2];
				}
		
		
		}