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

public class LevelEndController : MonoBehaviour {

    public Material Material;
    public GameObject GameObject;
    public Renderer Renderer;

    private void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.layer == 10)
        {
            GameObject.layer = 0;
            Renderer.material = Material;
        }
    }
}
