using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Collisiotest : MonoBehaviour {
private Renderer fuck;
// Use this for initialization
void Start () {
fuck = GetComponent<Renderer>();
}
// Update is called once per frame
void Update () {
}
void OnCollisionEnter(Collision c)
{
c.gameObject.GetComponent<Renderer>().material.color = Color.red;
Debug.Log("fuck1");
fuck.material.color = Color.red;
}
void OnCollisionExit(Collision c)
{
c.gameObject.GetComponent<Renderer>().material.color = Color.yellow;
//fuck.material.color = Color.red;
Debug.Log("fuck2");
}
}