using UnityEngine;
using System.Collections;

public class ChangementTextureBloc : MonoBehaviour {
	
	// booléens pour le changement de texture
	public bool textureLabo;
	public bool textureDiablo;
	
	// textures à appliquer
	public Texture2D blocLabo;
	public Texture2D blocDiablo;
	

	// Use this for initialization
	void Start () 
	{
		textureDiablo = false;
		textureLabo = false;
	}
	
	// Update is called once per frame
	void Update () {
		
		
		// gère le changement de texture
		if (textureLabo == false && gestionAffichage.etape == "niveau1")
		{
			renderer.material.mainTexture = blocLabo;
			textureDiablo = false;
			textureLabo = true;
			
		}
		
		if (textureDiablo == false&& gestionAffichage.etape == "niveau2")
		{
			renderer.material.mainTexture = blocDiablo;
			textureLabo = false;
			textureDiablo = true;
		}
	
	}
}
