Beispiel #1
0
        void Update()
        {
            if (a.CollidesWith(b))
            {
                a.GetComponent <MeshRenderer>().material.color = Color.red;
                b.GetComponent <MeshRenderer>().material.color = Color.red;

                Vector3 fix = a.FindFix(b);
                a.ApplyFix(fix);
            }
            else
            {
                a.GetComponent <MeshRenderer>().material.color = Color.green;
                b.GetComponent <MeshRenderer>().material.color = Color.green;
            }
        }