using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ColourCollide : MonoBehaviour
{
	public Texture newTexture;

	[SerializeField]
	[Tooltip("Layers to ignore when checking for blocks")]
	private LayerMask Ignore;

	public Block CurrentBlock;
	public Renderer abc;

    void Update()
    {
		Block.isBlockAtPosition(transform.position + Vector3.down / 2, 0.5f, ~Ignore, out CurrentBlock);

		abc = CurrentBlock.GetComponent<Renderer>();
		if(abc.material != newTexture){
			abc.material.SetTexture("_Albedo", newTexture);
		}
    }
}
